I'm trying to determine the best way to organize our Maven / Spring web applications and have been looking around to see examples. Unfortunately, they seem to conflict at certain points.
How should the folders be organized in a Spring MVC webapp and what should they be called?
The big differences I see are:
- The folder for JSPs.
- /src/main/webapp/WEB-INF/jsp/ or
- /src/main/webapp/WEB-INF/views/
- The Spring configuration files.
- /src/main/resources/META-INF/spring/context.xml or
- /src/main/resources/spring/context.xml or
- /src/main/webapp/WEB-INF/spring/context.xml
- Where assets/resources belong.
- /src/main/webapp/WEB-INF/images/ or
- /src/main/webapp/resources/images/ (with a urlrewriter)
The SpringSource samples in their SVN repo are not consistent, although their template for an MVC app uses the following:
- /src/main/resources/META-INF/spring/
- /src/main/webapp/resources/
- /src/main/webapp/WEB-INF/views/
I know this sounds like a petty, possibly unimportant issue, but we have a large team of people who are going to be working independently and we need to make a decision to keep everything understandable. We'd like to follow any standards that exist so that Spring developers coming in can easily jump in.
Thank you.
P.S. Yes, I realize that anyone should be able to handle being told "The views are in the jsp folder." without much ado, but I'm going for standards here, people.