Chapter 2. Web Applications: Servlets, JSPs, and More

Tomcat administrators do not need to be Java or Web developers; however, an understanding of the technologies involved is useful. Toward that objective, this chapter provides an introduction to the following technologies for building dynamic Web sites:

  • CGI scripts

  • Server-based Java technologies: servlets, JSPs, and tag libraries

  • MVC architecture, and implementations (Struts, for example)

  • Web applications built using the preceding technologies

A Brief History of Web Applications

Initial Web sites were static — they merely served up HTML pages. Also, the protocol for serving up Web pages, Hypertext Transfer Protocol (HTTP), was a simple, stateless protocol.

This state of affairs didn't last long. Soon, there was a new need for showing information that changed with time. Also, people wanted to do more complex things with Web sites, for example keep track of what the user did the last time, so as to enable more complex commerce related interactions, such as putting items in a shopping cart. The first required a mechanism to serve up dynamic content, and the second required a way to maintain state over a stateless protocol such as HTTP.

CGI Scripts: The First Mechanism for Dynamic Content

The first mechanism for serving up dynamic content to users was the Common Gateway Interface (CGI). Executable applications (usually, but not necessarily, written in PERL or C) were provided with an interface that enabled clients to access them in a standard ...

Get Professional Apache Tomcat 6 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.