java - Spring MVC interceptor - intercept all request -
i want interceptor requests. problem interceptor captures links http://localhost:8080/car/cardetails/105303/?currencycode=usd
, doesn't captures links http://localhost:8080/index.jsp?pagename=oldlegacypage¤cycode=usd&locale=en
.
the interceptor used translate legacy links. couldn't make intercept request starting index.jsp
this configuration did in servlet-context.xml (spring version 3.1.1.release):
<!-- dispatcherservlet context: defines servlet's request-processing infrastructure --> <!-- controller mapping configuration --> <interceptors> <interceptor> <mapping path="/**" /> <beans:bean class="com.mydomain.interceptor.legacyrequestinterceptor" /> </interceptor> </interceptors> <default-servlet-handler />
thank you
update:
seems works if modify servlet mapping /
/*
of dispatcherservlet:
<servlet-mapping> <servlet-name>appservlet</servlet-name> <url-pattern>/*</url-pattern> </servlet-mapping>
and adding defaultannotationhandlermapping
bean in servlet-context.xml.
<beans:bean class="org.springframework.web.servlet.mvc.annotation.defaultannotationhandlermapping"/>
Comments
Post a Comment