I need to map interceptor for all methods in annotated controller with @RequestMapping(value = "/client")
In mapping I have
<mvc:interceptor>
<mvc:mapping path="/app/client/*"/>
<bean class="com.cci.isa.web.CIPClientHandleInterceptor" />
</mvc:interceptor>
This interceptor called perfectly for urls like:
1. http://host/app/client/clientUpdateForm?clientId=305
But doesn't called for urls like:
2. http://host/app/client/clientUpdateForm/clientId_305 (with slash after method name)
How get it called for second variant?
Thanks a lot.
This question is too old, but maybe this helps somebody.
You should try removing /app
, I think it's not necessary and perhaps this is causing the problem.
<mvc:mapping path="/client/**"/>
I think this will achieve what you would like:
<mvc:mapping path="/app/client/**/*"/>
The '/**' suggests any number of directories. When this is used in conjunction with '/*', you have something that looks at an arbitrary folder depth, with an arbitrary file name.
If your controller with
@RequestMapping(value = "/client")
Try
<mvc:mapping path="/client**"/>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With