O'Reilly logo

Building Scalable and High-Performance Java™ Web Applications Using J2EE™ Technology by Greg Barish

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

Developing Servlets

The development process for a servlet is straightforward:

1.
Design the Web interface to the servlet—usually an HTML page that invokes servlet functionality. For example, have an HTML form request that the servlet process its contents upon clicking the Submit button.
2.
Code and compile the servlet, making sure that the servlet class is designed to handle the HTTP requests of interest (such as POST or GET).

Let's see how this process works in terms of developing and deploying our example.

Designing the Servlet Interface

There's nothing magical or complicated about the HTML that leads to the invocation of the servlet. If you've written Web pages that invoke CGI functionality, Web pages that invoke servlets will look pretty ...

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