I'm not using Spring theme's, I just want to add a CSS file to the JSP and I think I have the URI reference wrong. The file is in the WEB-INF/resources/css directory.
Per your suggestion I moved the resources directory to the same level as the WEB-INF directory and changed the JSP to be the following:
Just to make sure that I understand. Since the web.xml file has the servlet mapping for the Dispatcher Servlet as /, then the Dispatcher Servlet really is serving up this resource right?
The reason that I ask is because this resolves to "/application context/resources/css/dvdTrackerCSS.css" in the jsp.
then the Dispatcher Servlet really is serving up this resource right?
It looks like that line is required for the Dispatcher Servlet to be able to serve up the static content.
Yup. Sounds like you figured out the answer to your question By mapping it to / you are essentially saying that the dispatcher servlet is the default servlet and it will be handling all requests including those for static content.
My bad <mvc:resources location="/resources/**" mapping="/resources/"/> must have been <mvc:resources location="/resources/" mapping="/resources/**"/>.
I have same configuration as above :
Folder Structure is as in attachment.
As for jsp is concerned it is as follows :
The logs for the application are in the attachment .
Now the servlet URL is as follows .. Since it is '/' allows requests will route through Dispatcher.
The logs suggest that No handler is found for the mapping...
What could be the issue ... is it servlet configuration/folder structure..
Capture.PNG
Capture.PNG
What are your superhero powers? Go ahead and try them on this tiny ad: