All Examples  This Package

Class examples.servlets.PhoneServlet

java.lang.Object
   |
   +----javax.servlet.GenericServlet
           |
           +----javax.servlet.http.HttpServlet
                   |
                   +----examples.servlets.PhoneServlet

public class PhoneServlet
extends HttpServlet
This simple phonebook application is built on top of a properties list. It uses the text file "phonelist" also in this directory. You may invoke the PhoneServlet from a browser, using the example "PhoneServlet.html" page, also in this directory.

Author:
Copyright (c) 1996-2000 by BEA Systems, Inc. All Rights Reserved.

Constructor Index

 o PhoneServlet()

Method Index

 o getServletInfo()
Simple information about the servlet.
 o init()
 o service(HttpServletRequest, HttpServletResponse)
Implements the service method.

Constructors

 o PhoneServlet
 public PhoneServlet()

Methods

 o init
 public void init()
Overrides:
init in class GenericServlet
 o service
 public void service(HttpServletRequest req,
                     HttpServletResponse res) throws IOException
Implements the service method. If the query is for a specific person, this method just returns; otherwise, it dumps the whole extensions list. We use an htmlKona servlet page to display the results.

Overrides:
service in class HttpServlet
 o getServletInfo
 public String getServletInfo()
Simple information about the servlet.

Overrides:
getServletInfo in class GenericServlet

All Examples  This Package