STS Spring MVC: How to include a JS file in a JSP
问题 I installed SpringSource Tool Suite 2.8.0. I'm trying to include a JS file in a JSP, using the Spring MVC template as a starting point. My JSP looks like this: <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> <%@ page session="false" %> <html> <head> <title>Home</title> <script type="text/javascript" src="/a.js"></script> </head> <body> Hello world! </body> </html> a.js is under src\main\resources and looks like this: window.alert("A"); The result is that "Hello world!" gets