3

我第一次安装了蒲公英数据表。我遵循了本指南。我正在使用版本 1.0.1

您能帮我解决以下错误吗:

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

4

2 回答 2

2

我需要添加以下内容mvc-core-config.xml以公开蒲公英的资源:

<mvc:resources mapping="/dandelion/**" location="classpath:/META-INF/resources/dandelion/" />
于 2015-11-06T09:07:40.010 回答
-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>
于 2015-07-29T07:42:06.170 回答