The application is deliberately created in JSP or servlets to keep it simple and to avoid having familiarity with other frameworks to understand the example. Before we get into the basics of the application code, let's solve the error that Eclipse complains of in step 5 of the Creating a MyDistance Project section. Add the following dependency in the
pom file and the error should vanish:
<!-- Include servlet API --> <dependency> <groupId>javax.servlet</groupId> <artifactId>javax.servlet-api</artifactId> <version>3.1.0</version> <scope>provided</scope> </dependency>
The preceding dependency will also be required for writing servlets later in the Adding a Servlet section.
The scope is provided, which means that the container ...