I just started with Spring 3 MVC today. Running into a dilemma…
web.xml maps everything (“/”) to Spring. But as a result, when I put something like:
<link rel="stylesheet" type="text/css" href="<%=request.getContextPath()%>/css/navigation.css" />
It is not returned by the container…
Perhaps someone could suggest how to handle this?
Thanks.
Use
mvc:resources, as explained in the documentation. This allows service static resources from the web app, but also from the classpath.