O'Reilly logo

Java EE Development with Eclipse - Second Edition by Ram Kulkarni

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

Implementing login application using Java Servlet

We will now see how to implement a login application using Servlet. Create a new Dynamic Web Application in Eclipse as described in the previous section. We will call this LoginServletApp.

  1. Right-click on the src folder under Java Resources for the project in Project Explorer. Select the New | Servlet menu option.
  2. In the Create Servlet wizard, enter the package name as packt.book.jee_eclipse.book.servlet and the class name as LoginServlet. Then, click Finish.
    Implementing login application using Java Servlet

    Figure 2.22 Create Servlet wizard

  3. The Servlet wizard creates the class for you. Notice the @WebServlet("/LoginServlet") annotation just above the ...

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