I'm using Maven nowadays and I have to "mavenize" a dynamic web project (J2EE/Eclipse). I got the application.war successfully built, but when I deploy it in Tomcat, I got so many errors and I began to resolve them 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 do I have to place Under src/main/resources and which files do I keep it Under WEB-INF?
I'll post a picture with all my files Under WEB-INF and hope that will help to answer:

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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With