Hi gurus,
I'm completely new to web technologies and try to write my first Spring MVC application. I have following problem:
My project has following structure:
- WEB-iNF
classes - compuled java code (controllers etc.)
views - jsp pages
lib - Spring and other libraries
css - folder with my css files
I use <mvc:resources> in following way:
Code:
<mvc:resources mapping="/resources/**" location="/css/" cache-period="31556926" />
My understanding here is that I "map" /resources to /css directory.
I run my application using Glassfish server (ver. 3.1.2) and see in the log following enrty:
Code:
Mapped URL path [/resources/**] onto handler 'org.springframework.web.servlet.resource.ResourceHttpRequestHandler#0'
It seems to be OK. Next I'll try to use my css file within jsp using:
Code:
<link rel="stylesheet" href="<s:url value="/resources/main.css" />" type="text/css">
where s points to :
Code:
<%@ taglib prefix="s" uri="http://www.springframework.org/tags"%>
And this doesn't work without any information. I'll try to get access to main.css file directly from the browser but always get HTTP Status 404 - The requested resource is not available. Any help will be very appreciated.