Why my custom js is loading but jquery-1.11.1.js is not loading, tried placing it in same folder as my custom js(StartPage.js), but still on firebug console its showing not found.
<html>
<head>
<title>title</title>
<script type="text/javascript" src="${pageContext.request.contextPath}/jquery-1.11.1.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/StartPage.js"></script>
</head>
<body>
<%@ include file="/html/StartPage.html"%>
</body>
</html>
My bad...
I was running the application by right-clicking on index.jsp from eclipse, that's why it was getting confused in resolving js file paths, and StartPage.js was loading from Spring container, as /StartPage was getting resolved from @RequestMapping from the controller.
Now I ran whole project on the server and the path is resolved for all js files(using ${PageContext.request.contextPath}).
Try this path and try clearing cache of broswer
you are missing "js" from your path try the following path
${pageContext.request.contextPath}/js/jquery-1.11.1.js
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.