본문 바로가기
IBM - old/WAS 문제&해결

WebSphere 와 Struts 2 를 연계 사용시 404 error 발생

by freeman98 2016. 5. 6.

1. WAS 버전 : WebSphere ND v6.1

2. OS : All

3. Error 발생 시점 :  http://~~/context_root/index.jsp 하면 잘 나오는데 struts 2 action 명으로 호출하면 404 error 발생

4. Error message :
Error 404: SRVE0190E: File not found: /eventProfile.action

5. 예상 이유 : Struts 2 의 Action 을 사용하기 위해 Custom Servlet Filter 를 사용하려고 하면서 문제 발생

6. 조치 방안 :
 Custom Servlet Filter 를 사용하기 위해서는 하단의 custom property 를 Web Container 에 설정이 필요

Invoking the filter capability

You
might need use a custom servlet filter with Web applications to map
files from a one URI to another URI that points to a particular
resource.
For example, you might map URIs that start with
my_company to
the
my_company/external directory.
Without enabling the com.ibm.ws.webcontainer.invokeFiltersCompatibility
 custom
property, the Web container does not call any custom servlet filters.

With
this custom property, the Web container calls custom servlet filters
before looking for welcome files. Also, if the Web container cannot
find a resource, it calls the custom servlet filters before creating
a FileNotFoundException exception. This change enables the Web container
to verify whether the custom servlet filters modify the path to a
resource.

com.ibm.ws.webcontainer.invokeFiltersCompatibility
true

http://publib.boulder.ibm.com/infocenter/wasinfo/v6r1/index.jsp?topic=/com.ibm.websphere.express.doc/info/exp/ae/rweb_custom_props.html
http://www-01.ibm.com/support/docview.wss?uid=swg24014758

댓글