Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What are the conventional locations for for JSPs, JavaScript, CSS, Images in Maven web projects?

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?

like image 342
forumans Avatar asked Apr 04 '11 17:04

forumans


1 Answers

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
like image 164
Can't Tell Avatar answered Sep 20 '22 12:09

Can't Tell