Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/jsp/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Jsp 找不到js和css资源-获取404_Jsp_Web Applications - Fatal编程技术网

Jsp 找不到js和css资源-获取404

Jsp 找不到js和css资源-获取404,jsp,web-applications,Jsp,Web Applications,我有一个非常简单的webapp,无法通过和标记从服务器获取.js和.css文件。 错误:GEThttp://localhost:8080/resources/js/lib.js 404(未找到) 这是我的index.jsp: <html> <head> <jsp:include page="/pages/general/scripts.jsp"/> </head> <body> .

我有一个非常简单的webapp,无法通过
标记从服务器获取.js和.css文件。 错误:
GEThttp://localhost:8080/resources/js/lib.js 404(未找到)

这是我的index.jsp:

<html>
    <head>
        <jsp:include page="/pages/general/scripts.jsp"/>
    </head>
    <body>
        ...
    </body>
</html>

...
这是scripts.jsp:

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
<script type="text/javascript" src="/resources/js/lib.js"></script>

<link rel="stylesheet" type="text/css" href="/resources/css/style.css">

我的文件:

我做错了什么

编辑:顺便说一句,我检查过了,我可以很容易地通过他们的url找到这些文件。如果我访问localhost:8080/myApp/resources/js/lib.js,那么我会看到文件的内容。


<script type="text/javascript" src="/resources/js/lib.js"></script>
我怀疑这条路不对。尝试类似于src=“/resources/js/lib.js”