IntelliJ IDEA编辑器显示web.xml红叉,内容如下
The content of element type “web-app” must match “(icon ,display-
name ,description ,distributable ,context-param*,filter*,filter-mapping*,listener*,servlet*,servlet-
mapping*,session-config ,mime-mapping*,welcome-file-list ,error-page*,taglib*,resource-env-
ref*,resource-ref*,security-constraint*,login-config ,security-role*,env-entry*,ejb-ref*,ejb-local-ref*)”.
- No grammar constraints (DTD or XML schema) detected for the document.
出错原因是web.xml
标签顺序有问题,比如下面的顺序就是正确的:
<!DOCTYPE web-app PUBLIC
"-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd" >
<web-app>
<display-name>Agreport</display-name>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath:ureport-console-context.xml</param-value>
</context-param>
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<servlet>
<servlet-name>ureportServlet</servlet-name>
<servlet-class>com.bstek.ureport.console.UReportServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>ureportServlet</servlet-name>
<url-pattern>/ureport/*</url-pattern>
</servlet-mapping>
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
</web-app>
而下面的顺序就会提示红叉:
<!DOCTYPE web-app PUBLIC
"-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd" >
<web-app>
<display-name>Agreport</display-name>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath:ureport-console-context.xml</param-value>
</context-param>
<servlet>
<servlet-name>ureportServlet</servlet-name>
<servlet-class>com.bstek.ureport.console.UReportServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>ureportServlet</servlet-name>
<url-pattern>/ureport/*</url-pattern>
</servlet-mapping>
<!--调正顺序-->
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
</web-app>
最新评论
网飞没问题, 迪士尼+有解决方案么?
pp助手是安卓手机用的,根本下载用不来苹果
已解决
这样的话数据库里的结构为{"attachment":{"content":"xxx"}}, 要怎么才能变成{"content":"xxx"},从而使结构保持一致?
赞! make test不过的坑都写到的,谢谢楼主~
谢谢你
用了root用户还是一直502是怎么回事呢
student id 是空的