Ceci est mon fichier dispacter-servlet.xml. Quand je Déployez le projet de résine pro 4.0.36 il charge ma page d'index et le contenu, mais ne réussit pas à charger des fichiers css et images stockées dans le dossier staticresourcesRessources de mappage dans la servlet du répartiteur (serveur de résine)
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/mvc
http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.0.xsd">
<context:component-scan base-package="com.dogears" />
<bean id="viewResolver"
class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<property name="prefix">
<value>/WEB-INF/pages/</value>
</property>
<property name="suffix">
<value>.jsp</value>
</property>
</bean>
<import resource="classpath:beans.xml"/>
<mvc:resources mapping="/resources/**" location="/staticresources/" />
<mvc:annotation-driven />
S'il vous plaît quelqu'un peut me dire comment mapper mon dossier de ressources statiques, de sorte que chaque fois que la demande est du patter/resources/* il redirige la demande vers le dossier de ressources statiques. le dossier staticresources se trouve dansrépertoire MyspringProject/src/main/webapps.
duplication possible de http://stackoverflow.com/questions/26325524/match-for-root-url-and-serving-of-static-resources – OO7
Essayez ma réponse. Puisse-t-il t'aider. – OO7