Reputation: 2814
There are a lot of folders in a Smart Template project in STS. My question is where to add what?
There are 4 folders under SRC
1. Main/java.
2. Main/resources.
3. Test/java.
4. Test/resources.
Should I add my controllers in all the above folders or in a few or or or..?
There is another folder called SRC!
Should I use the 'view' folder for adding all my web pages (say JSP pages)?
Can anyone please elaborate?
Also please let me know if using Dynamic Web Project is a better option than using Spring Template project or vice versa?
Upvotes: 0
Views: 63
Reputation: 120881
This folder structure is the structure of an maven project.
Java classes for your application should be in src/main/java
for example src/main/java/com/example/web
(com.example.web is the package)
The JSPs should be in src/main/webapp/WEB-INF/jsps
(you can use an other subfolder then jsps
but it must be below src/main/webapp/WEB-INF/
)
Also please let me know if using Dynamic Web Project is a better option than using Spring Template project or vice versa?
If you know Maven then the Spring Template is better (in my opinion).
BTW It is important to have pom.xml
in the project root.
Upvotes: 1