Home arrow Java arrow How to Develop Servlets

How to Develop Servlets

Servlets are Java classes that run on servers. In this article, the first of three parts, you will learn how to create, save and compile a servlet. This article is excerpted from chapter five of the book Murach's Java Servlets and JSP, written by Andrea Steelman and Joel Murach (Murach; ISBN: 1890774189).

Author Info:
By: Murach Publishing
Rating: 5 stars5 stars5 stars5 stars5 stars / 12
September 14, 2006
  1. · How to Develop Servlets
  2. · The code for the EmailServlet class
  3. · How to create a servlet
  4. · How to save and compile a servlet

print this article

How to Develop Servlets
(Page 1 of 4 )

The Email List application

In this topic, you'll see how the Email List application that was presented in the last chapter works when it uses a servlet instead of a JSP. Once you get the general idea of how this works, youíll be ready to learn the specific skills that you need for developing servlets.

The user interface for the application

Figure 5-1 shows the two pages that make up the user interface for the Email List application. These pages are the same as the pages that are shown in the last chapter except that the second page uses a servlet instead of a JSP.

Like the last chapter, the first page is an HTML page that asks the user to enter a first name, last name, and email address. However, when the user clicks on the Submit button for this application, the HTML page calls a servlet instead of a JSP and passes the three user entries to the servlet. This is shown by the URL thatís displayed in the browser for the second page.

The HTML page

The servlet page

Figure 5-1.  The user interface for the application

blog comments powered by Disqus

- Java Too Insecure, Says Microsoft Researcher
- Google Beats Oracle in Java Ruling
- Deploying Multiple Java Applets as One
- Deploying Java Applets
- Understanding Deployment Frameworks
- Database Programming in Java Using JDBC
- Extension Interfaces and SAX
- Entities, Handlers and SAX
- Advanced SAX
- Conversions and Java Print Streams
- Formatters and Java Print Streams
- Java Print Streams
- Wildcards, Arrays, and Generics in Java
- Wildcards and Generic Methods in Java
- Finishing the Project: Java Web Development ...

Watch our Tech Videos 
Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us 
Weekly Newsletter
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 

Developer Shed Affiliates


© 2003-2019 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials