Die Quelle nicht finden die Ressource-Dateien (css, jsp...)

Ich bin mit einer jsp-Datei, wie ein Modell aus einem Controller und ich will ein css-styles und js-Bibliotheken

  • Proyect
    • Webcontent
    • Vermögenswerte
    • WEB-INF
      • jsp

In web.xml:

<web-app version="2.5" 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_2_5.xsd">
<welcome-file-list>
    <welcome-file>/WEB-INF/jsp/index.jsp</welcome-file>
</welcome-file-list>

<!-- Processes application requests -->
<servlet>
    <servlet-name>MyProject</servlet-name>
    <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
    <init-param>
        <param-name>contextConfigLocation</param-name>
        <param-value>/WEB-INF/applicationContext.xml</param-value>
    </init-param>
    <load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
    <servlet-name>MyProject</servlet-name>
    <url-pattern>/</url-pattern>
</servlet-mapping>

 </web-app>

In applicationContext.xml:

<context:annotation-config />
<context:component-scan base-package="main.mypack.controller" />



<bean
    class="org.springframework.web.servlet.view.InternalResourceViewResolver">
    <property name="prefix" value="/WEB-INF/jsp/" />
    <property name="suffix" value=".jsp"/>
</bean>

Und in meiner jsp-Datei an: href="/assets/css/jquery.mobile.fixedToolbar.polyfill.css"

Noy arbeiten, keine Hilfe?

EDIT: ich bin mit 2,5 Spring-version, und ich habe Fehler wie: Kein mapping gefunden für den HTTP-request mit dem URI [/MyProject/assets/js/jqm-project.js] in DispatcherServlet mit dem Namen "MyProject"

InformationsquelleAutor Marta | 2012-05-08

Schreibe einen Kommentar