We will now see how to implement a login application using Java Servlet. Create a new Dynamic Web Application in Eclipse as described in the previous section. We will call this LoginServletApp:
- Right-click on the src folder under Java Resources for the project in Project Explorer. Select the New | Servlet menu option.
- In the Create Servlet wizard, enter package name as packt.book.jee_eclipse.book.servlet and class name as LoginServlet. Then, click Finish.
- The servlet wizard creates the class for you. Notice the @WebServlet("/LoginServlet") annotation just above the class declaration. Before ...