first of all I’m a Spring noob, and yes I used the search function, so please be kind . I did the Spring 2.5 MVC tutorial and everything works fine.
Now I want to extend the current application by adding some simple jsp pages to the WEB-INF folder. To keep the application very simple I forward all http requests to my Dispatcher Servlet.
Then I added an UrlFilenameViewController (that catches all requests that are not catched by other controllers).
While this works fine for simple jsp pages, I get an error if I try to access, js, images, css … files within these jsp pages. Is there a simple way to control which “kind” of requests are directly forwarded to the WEB-INF folder (e.g. requests for images in my WEB-INF/img folder) and which requests are modified by the viewResolver (e.g. all requests with urls that that end with *.jsp, *.html or *.htm)?
<bean name="/**/*.*" class="org.springframework.web.servlet.mvc.UrlFilenameViewController" />
<bean id="viewResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<property name="viewClass" value="org.springframework.web.servlet.view.JstlView" />
<property name="prefix" value="/WEB-INF/jsp/" />
<property name="suffix" value=".jsp" />