我正在尝试将 JavaScript 文件加载到我的 jsp 文件中
这是我尝试过的:
<script type="text/javascript" src="static/js/jquery-ui-1.10.3.custom.js"></script>
<script type="text/javascript" src="/static/js/jquery-ui-1.10.3.custom.js"></script>
<script type="text/javascript" src="/WebContent/WEB-INF/static/js/jquery-ui-1.10.3.custom.js"></script>
<script type="text/javascript" src="WebContent/WEB-INF/static/js/jquery-ui-1.10.3.custom.js"></script>
<script type="text/javascript" src="/WEB-INF/static/js/jquery-ui-1.10.3.custom.js"></script>
<script type="text/javascript" src="WEB-INF/static/js/jquery-ui-1.10.3.custom.js"></script>
<script type="text/javascript" src="/USI-WEB/WEB-INF/static/js/jquery-ui-1.10.3.custom.js"></script>
<script type="text/javascript" src="/USI-WEB/WebContent/WEB-INF/static/js/jquery-ui-1.10.3.custom.js"></script>
<script type="text/javascript" src="USI-WEB/WEB-INF/static/js/jquery-ui-1.10.3.custom.js"></script>
<script type="text/javascript" src="USI-WEB/WebContent/WEB-INF/static/js/jquery-ui-1.10.3.custom.js"></script>
<script type="text/javascript" src="<%=request.getContextPath() + "/static/js/jquery-ui-1.10.3.custom.js"%>"></script>
<script type="text/javascript" src="<%=request.getContextPath() + "/static/js/jquery-ui-1.10.3.custom.js"%>"></script>
<script type="text/javascript" src="<%=request.getContextPath() + "/WebContent/WEB-INF/static/js/jquery-ui-1.10.3.custom.js"%>"></script>
<script type="text/javascript" src="<%=request.getContextPath() + "WebContent/WEB-INF/static/js/jquery-ui-1.10.3.custom.js"%>"></script>
<script type="text/javascript" src="<%=request.getContextPath() + "/WEB-INF/static/js/jquery-ui-1.10.3.custom.js"%>"></script>
<script type="text/javascript" src="<%=request.getContextPath() + "WEB-INF/static/js/jquery-ui-1.10.3.custom.js"%>"></script>
这是我的 web.xml
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" id="WebApp_ID" version="3.0">
<display-name>USI WEB</display-name>
<!-- Filter to set character encoding on each request -->
<servlet>
<servlet-name>Servlet</servlet-name>
<servlet-class>usi.servlet.Servlet</servlet-class>
</servlet>
<welcome-file-list>
<welcome-file>Servlet</welcome-file>
</welcome-file-list>
</web-app>
在这一切上,我得到: The requested resource () is not available.