O'Reilly logo

Maven for Eclipse by Sanjay Shah

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

The application code

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.

Note

The scope is provided, which means that the container ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required