This forum is now a read-only archive. All commenting, posting, registration services have been turned off. Those needing community support and/or wanting to ask questions should refer to the Tag/Forum map, and to http://spring.io/questions for a curated list of stackoverflow tags that Pivotal engineers, and the community, monitor.

AnnouncementAnnouncement Module

Collapse

No announcement yet.

multiple servlet-mappings not working for DisbatcherServletPage Title Module

All my urls that end with .html seem to map appropriately but for some reason anything that starts with /myapp/resources/ does not get mapped to the appropriate controller method UNLESS it ends with .html. I tried removing the servlet mapping for the .html and that doesn't fix it either. I changed the servlet mapping to /* and ALL urls end up going to the appropriate controllers but my static content is 404'd. I need to know how to configure not html urls to be served based on the path prefix /resources/ even if the url ends in .gif, .png, .css or whatever. Here is the contoller method giving me the trouble:

suddenly it starts working (responding to http://localhost:8080/myapp/resources/logo.png). It looks like mapping a spring disbatcher servlet via a path prefix causes the URIs to be stripped of the prefix when evaluating the contoller mappings. Why? Is this why the roo applications have the crazy urlrewrite stuff all over the place? Is there a way for this one URL that I can pass the prefix to the controller? If not I am gonna have to set up 3 disbatcher servlets in order to separate my responding controllers.

Comment

Thanks for the reply. But I tried with the above mentioned entries in my web.xml file but still getting "The requested resource (/suggestio-1.0-SNAPSHOT/auth/login) is not available." error when I open http://localhost:8080/suggestio-1.0-SNAPSHOT/.