ajax
Class Contacts

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by ajax.Contacts
All Implemented Interfaces:
java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

public class Contacts
extends javax.servlet.http.HttpServlet

Contact list servlet

Author:
Adam J. Kaplan
See Also:
Serialized Form

Constructor Summary
Contacts()
           
 
Method Summary
 void doGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Get method handler for servlet functionality.
 void doPost(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Post method handler for servlet functionality.
static void forward(java.lang.String url, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Preforms request dispatching for an HttpServletRequest servlet request.
 boolean validate(java.lang.String s)
          A simple string validator which checks for null or empty strings.
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, service
 
Methods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, init, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Contacts

public Contacts()
Method Detail

doGet

public void doGet(javax.servlet.http.HttpServletRequest request,
                  javax.servlet.http.HttpServletResponse response)
           throws javax.servlet.ServletException,
                  java.io.IOException
Get method handler for servlet functionality.

Overrides:
doGet in class javax.servlet.http.HttpServlet
Parameters:
request - The HTTP request to the servlet
response - The HTTP response to the client
Throws:
javax.servlet.ServletException
java.io.IOException

doPost

public void doPost(javax.servlet.http.HttpServletRequest request,
                   javax.servlet.http.HttpServletResponse response)
            throws javax.servlet.ServletException,
                   java.io.IOException
Post method handler for servlet functionality.

Overrides:
doPost in class javax.servlet.http.HttpServlet
Parameters:
request - The HTTP request to the servlet
response - The HTTP response to the client
Throws:
javax.servlet.ServletException
java.io.IOException
See Also:
doGet(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)

validate

public boolean validate(java.lang.String s)
A simple string validator which checks for null or empty strings.

Parameters:
s - the string to validate
Returns:
true if the string is not null or empty

forward

public static void forward(java.lang.String url,
                           javax.servlet.http.HttpServletRequest request,
                           javax.servlet.http.HttpServletResponse response)
                    throws java.io.IOException,
                           javax.servlet.ServletException
Preforms request dispatching for an HttpServletRequest servlet request.

Parameters:
url - the destination url or jsp
request - the servlet request
response - the servlet response
Throws:
java.io.IOException
javax.servlet.ServletException
See Also:
HttpServletRequest, HttpServletResponse