项目启动的时候报错VALIDATION PROBLEMS WERE FOUND。
因为更新文件只更新了web.xml。所以,问题直接定位到web.xml文件,但是本地启动都正常,还是很懵逼。
查找原因:
1.首先是尝试把加的内容给去掉,加的内容是关于HTTP安全请求,但是并没有起作用
<security-constraint>
<web-resource-collection>
<web-resource-name>fortune</web-resource-name>
<url-pattern>/*</url-pattern>
<http-method>PUT</http-method>
<http-method>DELETE</http-method>
<http-method>HEAD</http-method>
<http-method>OPTIONS</http-method>
<http-method>TRACE</http-method>
</web-resource-collection>
<auth-constraint></auth-constraint>
</security-constraint>
<login-config>
<auth-method>BASIC</auth-method>
</login-config>
2.网上的说法是头文件的版本问题,确认了下版本version
=
"2.4",没有问题
3.这时候先解决问题,找了测试环境的web.xml给替换掉,顺利启动
继续查找原因:
4. init-param 元素不能包含 description 元素
5.检查你的taglib在web.xml里的引用方式, 用<jsp-config> </jsp-config> 将所有taglib引用封住。
6.webloigc对于xml文件的校验比tomcat严格,因为在xml中添加了不属于xsd定义的标签