Web/Spring 2013. 10. 8. 13:06

org.springframework.web.filter.DelegatingFilterProxy 를 써서 Servlet filter을 작성할때, web.xml 파일의 contextConfigLocation 을 사용을 주의해야 한다.


아래와 같이 servlet 태그안에서 contextConfigLocation을 지정해 주어도 이유는 모르지만 서버 구동시 Servlet filter를 찾을 수 없다고 나온다.


<servlet>

<servlet-name>dispatcher</servlet-name>

<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>

<init-param>

<param-name>contextConfigLocation</param-name>

<param-value>/WEB-INF/config/servletContext.xml</param-value>

</init-param>

<load-on-startup>1</load-on-startup>

</servlet>


아래와 같이 해야 제대로 나온다.

<context-param>

<param-name>contextConfigLoction</param-name>

<param-value>

/WEB-INF/config/xxxFilterContext.xml

</param-value>

</context-param>


이것땜시, 거의 하루를 까먹었다. 아놔..



posted by hani^___^
: