2017-03-24 2 views
-2

내 Struts2 첫 번째 코드내 Struts2 첫 번째 프로그램은

<filter> 
     <filter-name>struts2</filter-name> 
     <filter-class>org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter</filter-class> 
    </filter> 

    <filter-mapping> 
     <filter-name>struts2</filter-name> 
     <url-pattern>/*</url-pattern> 
    </filter-mapping> 
+0

이 같은 세부 무엇 ISN을 제공하십시오 작동하지 않는 내가 Javabrain의 같은 Struts2의 튜토리얼을 따라가 작동하지 일하고있어. –

+0

"작동하지 않음"을 정의하십시오. –

답변

0

Struts2 필터 매핑에 대한 다음 web.xml

<web-app id="MyStrutsApp" version="2.4" 
    xmlns="http://java.sun.com/xml/ns/j2ee" 
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"> 

    <filter> 
     <filter-name>struts2</filter-name> 
     <filter-class>org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter</filter-class> 
    </filter> 

    <filter-mapping> 
     <filter-name>struts2</filter-name> 
     <url-pattern>/*</url-pattern> 
    </filter-mapping> 

    <!-- ... --> 

</web-app> 
+0

404 리소스에 문제가 있습니다./Projectname –

+0

답변 [this] (http://stackoverflow.com/a/26592952/573032) 대답. –

관련 문제