java - Couldn't access JS file from WEB-INF -


i have following project structure

project structure

in exportpage.jsp jsp have included js files as

<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> <script type="text/javascript" src="<c:url value="/js/jquery-1.11.2.min.js"/>"></script> <script type="text/javascript" src="<c:url value="/js/datatables.tabletools.js"/>"></script> 

but when run app access page getting 404 error both urls. url generated follow:

http://localhost:8090/springmvc/js/jquery-1.11.2.min.js

what have configure in sts fixed issue. build path issue. way maven type spring project in sts.

the problem that:user not have access web-inf.so,your js files in web-inf.when page load js files download user pc , user has no access folder , error.you must create js folder outside web-inf.you can create views in web-inf because user has no access directly folder.


Comments

Popular posts from this blog

android - MPAndroidChart - How to add Annotations or images to the chart -

javascript - Add class to another page attribute using URL id - Jquery -

firefox - Where is 'webgl.osmesalib' parameter? -