Struts2를 사용하기 시작했습니다. 나는 struts2 아키타 입을 사용하는 것이 좋은 생각이라고 생각했지만, 그것은 매우 시대에 뒤 떨어진 것으로 보인다. 여기ActionContextCleanUp은 더 이상 사용되지 않습니다. Struts2 Archetype
ActionContextCleanUp <<< is deprecated! Please use the new filters!
내 현재 web.xml 파일은 다음과 같습니다 : 내 프로젝트를 실행할 때, 나는이 경고가 계속
<?xml version="1.0" encoding="UTF-8"?>
<web-app
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
version="2.5">
<display-name>Test</display-name>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath*:applicationContext*.xml</param-value>
</context-param>
<!-- Filters -->
<filter>
<filter-name>action2-cleanup</filter-name>
<filter-class>org.apache.struts2.dispatcher.ActionContextCleanUp</filter-class>
</filter>
<filter>
<filter-name>sitemesh</filter-name>
<filter-class>com.opensymphony.module.sitemesh.filter.PageFilter</filter-class>
</filter>
<filter>
<filter-name>action2</filter-name>
<filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>action2-cleanup</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>sitemesh</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>action2</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<!-- Listeners -->
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<!-- Servlets -->
<servlet>
<servlet-name>dwr</servlet-name>
<servlet-class>uk.ltd.getahead.dwr.DWRServlet</servlet-class>
<init-param>
<param-name>debug</param-name>
<param-value>true</param-value>
</init-param>
</servlet>
<servlet>
<servlet-name>jspSupportServlet</servlet-name>
<servlet-class>org.apache.struts2.views.JspSupportServlet</servlet-class>
<load-on-startup>5</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>dwr</servlet-name>
<url-pattern>/dwr/*</url-pattern>
</servlet-mapping>
<!-- Welcome file lists -->
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
<welcome-file>default.jsp</welcome-file>
<welcome-file>index.html</welcome-file>
</welcome-file-list>
</web-app>
내가 경고 없애 변경합니까?
어떤 아키타 입을 사용하고 있습니까? –
어떤 버전인지 모르겠습니다. mvn archetype : generate -B -DgroupId = tutorial -DartifactId = tutorial -DarchetypeGroupId = org.apache.struts -DarchetypeArtifactId = struts2-archetype-starter. -DarchetypeVersion =을 포함시키지 않았으므로 최신 버전을 구할 필요가 없습니다. –
JIRA 티켓을 신청하십시오. 필터를 제거하여 경고를 없애면 경고 메시지가 표시됩니다. IIRC 거기에 동일한 문제가 있는지 여부를 모르겠지만 당신이 참조 할 수있는 SiteMesh 쇼 케이스가 있습니다. –