Reputation: 1635
I'm using Maven nowadays and i have to "mavenize" a dynamic web project (J2EE/Eclipse) , i got the application.war
succefuly built but when i deploy it in Tomcat, i got so much errors and i begin to resolve it and i know exactly what's the problem : i didn't place the right files Under the right folder !
So my question is : which files i have to place Under src/main/resources
and wich files i'll keep it Under WEB-INF
?
i'll post a picture with all my files Under WEB-INF
and hope that will help to answer :
Upvotes: 3
Views: 4284
Reputation: 9
You should keep frontEnd files like html,jsp,js,css files under web-inf which are to be used by application through links. all the static content like properties file and other utility items can be kept in src/main/resources.
Upvotes: 0
Reputation: 691635
The files that should end up in the classpath (i.e. under WEB-INF/classes
in the generated war file) should be in src/main/resources
.
The files that should end up under the root of the war file should be in src/main/webapp
. So, if you want a file to end up in WEB-INF/foo/bar
in the generated war file, the file should be under src/main/webapp/WEB-INF/foo/bar
. If you want a file to end up in images
in the generated war file, the file should be under src/main/webapp/images
Upvotes: 8