I have the line
<script type="text/javascript">
<%@include file="/js/home.js" %>
Which gives the error in title. The JS files are in /src/main/resources/static/js
. The error goes away if I create /src/main/webapp/js/home.js
. This answer says webapp/
is not recommended. https://stackoverflow.com/a/28727189/148844. We are using JARs and we are uploading a WAR to AWS via the web console. Eclipse expects webapp/js/
and Spring Boot expects resources/static/js
, so which should I use? How do I tell Eclipse how to find the JS file?
$ tree
├───src
│ ├───main
│ │ ├───java
│ │ ├───resources
│ │ │ └───static
│ │ │ ├───css
│ │ │ ├───fonts
│ │ │ ├───img
│ │ │ └───js
│ │ └───webapp
│ │ └───WEB-INF
│ │ └───jsp
We also have
spring.mvc.view.prefix: /WEB-INF/jsp/
spring.mvc.view.suffix: .jsp
Eclipse Version: Photon Release (4.8.0)