Maven Web ApplicationCreate an Maven web application in Eclipse using the maven-archetype-webapp archetype and do the following: 1. Change web.xml to the following:
This change basically says that our project requires an application server that supports the Servlet 3.0 Specification. 2. Add the following to pom.xml (right after <finalName>):
This change says that the project requires JDK 1.7 (or above) to compile, and the compiled class files are compatible with JVM 1.7. 3. Add the following dependencies to pom.xml:
This allows us to use classes like HttpServletRequest and HttpServletResponse in our Java code, and use JSTL in the JSPs. And since this is SHAM - Spring and Hibernate at the Minimum, feel free to remove the JUnit dependency because we won't be doing any unit testing. 4. Add a folder src/main/java. This is where the Java code would go. 5. Right click on the project and select Maven -> Update Project... |