I need to convert a traditional J2EE web application into a new Maven web project. In traditional project JSPs are under WebApp/jsps
folder, JavaScript & CSS files under WebApp/scripts
folder, image under WebApp/images
folder, .properties
files under WebApp/resources
folder.
In the Maven project where would each of those file types go? Should I create folders under src/main/webapp
such as: src/main/webapp/jsps
, src/main/webapp/images
, src/main/webapp/resources
… etc and copy the files from old project? Or is there any standard structure to follow?
Take a look at this article on the usage of the maven war plugin. It has a simple project structure.
Quoting from above link,
|-- pom.xml
`-- src
`-- main
|-- java
| `-- com
| `-- example
| `-- projects
| `-- SampleAction.java
|-- resources
| `-- images
| `-- sampleimage.jpg
| `-- js
| `-- scripts.js
| `-- css
| `-- styles.css
`-- webapp
|-- WEB-INF
| `-- web.xml
|-- index.jsp
`-- jsp
`-- websource.jsp
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