Aug 5th, 2009, 03:31 PM
Any way to force DispatcherServlet to exclude a set paths
When I map my DispatcherServlet to "/", I lose the ability to access static content not under Spring's controll (e.g. /css/global.css). I am using restful urls throughout my application, so cannot filter the mapping (like "/*.htm"). Is there any facility within SpringMVC to allow me to exclude these directories, either through configuration or through a custom class?
Aug 6th, 2009, 08:04 AM
if you had apache httpd in front of your application server, you could get it to send static content like images + css + js
If you are using tomcat for example, you would use modjk and some configuration like this
# Send everything to app server
JkMount /* worker
# Serve js, css, jpg using httpd
JkUnMount /js/*.js worker
JkUnMount /css/*.css worker
JkUnMount /images/*.jpg worker
Aug 6th, 2009, 08:36 AM
Thanks for the direction, but I was hoping for a portable solution that did not involve external configuration. That is a great tip, and one i will be sure to remember!
Aug 21st, 2009, 04:19 PM
hi rkroll, I'm looking at the same issue, did you find a workaround?
Tags for this Thread