je travailles sur un projet spring mvc, je voudrais associer du css a mes pages jsp. Mon problème est que je n'arrive pas à appeler une feuille de style par le link classique dans mes pages JSP. Les JSP et ma feuille de style CSS se trouvent au même endroit.
Ainsi ceci fonctionne :
1 2 3
| <style type="text/css">
<%@ include file="style.css" %>
</style> |
mais pas celui la
<link rel="stylesheet" type="text/css" href="style.css" />
N.B Ce n'est pas un problème de chemin (absolu/rélatif) je maitrise 
voici mon fichier de configuration web.xml, si eventuellement c'est ça la cause du problème
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
| <?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" id="WebApp_ID" version="3.0">
<display-name>ArticleAgroPart</display-name>
<context-param>
<param-name>log4jConfigLocation</param-name>
<param-value>classpath:log4j.xml</param-value>
</context-param>
<welcome-file-list>
<welcome-file>/listeArticle.do</welcome-file>
</welcome-file-list>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/application-context.xml</param-value>
</context-param>
<!-- Bootstraps the root web application context before servlet initialization -->
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<servlet>
<servlet-name>servletDispatcher</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
<init-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/servlet-context.xml</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>servletDispatcher</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping>
</web-app> |
Partager