O'Reilly logo

Java EE Development with Eclipse by Deepak Vohra

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

Creating a servlet

In this section, we shall create a servlet to process the AJAX request and send a server response. A servlet represents the Controller facet of the Model View Controller (MVC) design pattern; the JSP page represents the View facet. Go to File | New | Other and in the New wizard, expand Web and select Servlet. Click on Next as shown in the following screenshot:

Creating a servlet

In Create Servlet, select the project EclipseAjax in which you want to create a servlet, select the Source folder as /EclipseAjax/src, specify a Java package name as ajax.servlet and a Class name as FormServlet. A servlet extends the javax.servlet.http.HttpServlet class. ...

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