2015-07-28 247 views
3

我已經安裝了第一次蒲公英數據表。我遵循this指南。我使用的版本1.0.1蒲公英數據表錯誤 - 無法加載資源:服務器響應狀態爲404(未找到)

你能幫我解決以下錯誤:

Failed to load resource: the server responded with a status of 404 (Not Found) 

http://localhost:8080/website/dandelion/datatables/css/jquery.dataTables.css

Failed to load resource: the server responded with a status of 404 (Not Found) 

http://localhost:8080/website/dandelion/jquery/js/jquery.js

Failed to load resource: the server responded with a status of 404 (Not Found) 

http://localhost:8080/website/dandelion/datatables/js/jquery.dataTables.js

Failed to load resource: the server responded with a status of 404 (Not Found) 

http://localhost:8080/website/dandelion/datatables/features/filtering/jquery.dataTables.yadcf.js

Failed to load resource: the server responded with a status of 404 (Not Found) 

dandelion-datatables-91438756c71be2df6b2ee155197c3192.js:34

Uncaught ReferenceError: $ is not defined 

http://localhost:8080/website/dandelion/datatables/features/filtering/jquery.dataTables.yadcf.css

Failed to load resource: the server responded with a status of 404 (Not Found) 

http://localhost:8080/website/dandelion/datatables/css/jquery.dataTables.css

Failed to load resource: the server responded with a status of 404 (Not Found) 

http://localhost:8080/enepath/dandelion/datatables/css/jquery.dataTables.css

回答

-1

確保滿足所有要求,尤其是 「的Servlet容器3.0+」。此外,還要確保您的web.xml文件以及配置了Servlet 3.0 API:

<web-app 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" 
     version="3.0"> 
... 
</web-app> 
+1

是啊,我用的是2.5版本。我現在改了它,但錯誤仍然存​​在。我使用的是spring 4.1和tomcat 8 – QGA

2

我需要以下添加到mvc-core-config.xml爲了揭露蒲公英的資源:

<mvc:resources mapping="/dandelion/**" location="classpath:/META-INF/resources/dandelion/" /> 
相關問題