Possible Duplicate:
JSP can't find stylesheet
Tomcat7, spring framework3, jstl 1.2.
Hierarchy: WEB-INF/jsp WEB-INF/styles
I link stylesheet in my JSP file, which is located in WEB-INF/jsp: But it doesn’t work! When i open my application there is no styles, and writter by Tomcat:
Apache Tomcat/7.0.14 - Error report HTTP Status 404 - type Status report message description The requested resource () is not available. Apache Tomcat/7.0.14
So i put my styles folder out of WEB-INF and it still doesn’t work!
Also, images too don’t work, but my images folder not in WEB-INF and their path is corect…
What is the problem?
In Spring I put my resources in a folder outside of web-inf. Like this:
Web.xml
Then in my servlet-context.xml (configuration file specified in web.xml) file I exclude the resources directory from being managed by the dispatcher, so URLs prefixed with resources/ are not picked up by the dispatcher and attempted to be routed to an appropriate controller.
In my jsp I can then access resources as normal: