Home Segments Top Top Previous Next

1037: Mainline

A file—named servlets.properties by default—contains the table that relates servlet names to class names. That file resides on the servlet server computer, and the servlet server uses that file to respond to servlet-naming URLs.

Suppose, for example, that you have two names, startcritic and processcritic, which identify two classes, GetCriticFormServlet and ProcessCriticFormServlet. Then, the servlets properties table contains the following lines.

# This file contains name-class pairs for the example servlets 
# Lines beginning with # are comments 
  
# Returns an HTML page containing a form 
startcritic.code=GetCriticFormServlet 
  
# Processes completed form 
processcritic.code=ProcessCriticFormServlet