2014-05-14 5 views
0

죄송합니다. 동일한 문제가 여러 번 있었으므로이 질문을 게시했습니다. 그러나 대답은 보이지 않습니다. 제가 예외 처리 ErrorPage .Struts 디스패처를 찾을 수 없습니다. found.org.apache.jasper.JasperException : Struts 디스패처를 찾을 수 없습니다.

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

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

struts.xml 파일

<action name="home"> 
      <result name="success" >/WEB-INF/index.jsp</result> 
      <result name="error" >/WEB-INF/error/error.jsp</result> 
</action> 

추가 한 web.xml 파일

org.apache.catalina.core.StandardHostValve custom 
SEVERE: Exception Processing ErrorPage[errorCode=404, location=/WEB-INF/error/error.jsp] 
org.apache.jasper.JasperException: The Struts dispatcher cannot be found. This is usually caused by using Struts tags without the associated filter. Struts tags are only usable when the request has passed through its servlet filter, which initializes the Struts dispatcher needed for this tag 

아래와 같이 구하는 나야 오류 도움

struts2-core-2.2.1.jar 파일을 WEB_INF Folder 아래의 lib 디렉토리에 추가했습니다. 누군가이 문제를 해결하는 방법에 대해 도움을 줄 수 있습니까?

+0

jsp-s에 직접 액세스하지 말고 작업을 수행하십시오. –

+0

tanx ur 답장을 많이^AleksandrM.I 내 작업이 어떻게 생겼는지 업데이트했습니다. 잘못된 것이 있는지 확인하십시오. – Outlooker

+1

URL에 액세스 하시겠습니까? –

답변

0

은 스트럿츠 2.1.3 이후, FilterDispatcher이되지 않습니다 :

추천되고 있지 않습니다. 스트럿 2.1.3 사용하므로 StrutsPrepareAndExecuteFilter 대신 또는 StrutsPrepareFilterStrutsExecuteFilter 또한 Struts2의 최신 버전으로 마이그레이션 고려 이것

에 더하여 ActionContextCleanUp 필터를 사용 필요한 경우 (현재 2.3.16.3) 보안 문제를 피하기 위해

+1

답장 @ Andrea에 대한 tanx. 이제 web.xml에서 filter-name을 (를) org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter '로 변경했습니다. 같은 오류가 나다. – Outlooker