티스토리 뷰

728x90
어제까지 멀쩡히 돌아가던 프로젝트가 갑자기 아래와 같은 메세지를 띄우면서 500번 에러가 뜬다

"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. - [unknown location]"



여기저기 검색해보니까 web.xml을 이렇게 수정해주라고 하는데 수정해도 역시 마찬가지다

   <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>



더 찾아보니까 요렇게 한번 해보란다

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


오우 잘 돌아간다~

그런데 아직까지 왜 에러가 났는지 모르겠다
이클립스가 문제인지, 톰캣이 문제인지, 스트럿츠 jar 파일이 문제였는지
-_- 어쨌든 해결은 됐다