I'm using Spring MVC with JBoss AS 7.1.1 Final.
My project is organized as follows:
Web Pages
|-- WEB-INF
| |--jsp
| | |-- index.jsp
| |-- applicationContext.xml
| |-- dispatcher-servlet.xml
| |-- jboss-web.xml
| |-- web.xml
|-- resources
| |-- css
| |-- layout.css
|-- redirect.jsp
The file web.xml is:
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="3.0" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/applicationContext.xml</param-value>
</context-param>
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<servlet>
<servlet-name>dispatcher</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
<load-on-startup>2</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>dispatcher</servlet-name>
<url-pattern>/</url-pattern>
</servlet-mapping>
<session-config>
<session-timeout>
30
</session-timeout>
</session-config>
<welcome-file-list>
<welcome-file>redirect.jsp</welcome-file>
</welcome-file-list>
</web-app>
The file jboss-web.xml is:
<?xml version="1.0" encoding="UTF-8"?>
<jboss-web>
<context-root>/GUI</context-root>
</jboss-web>
The file redirect.jsp is:
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<% response.sendRedirect("index.htm"); %>
How can I set up inside index.jsp a link to resources/css/layout.css?