OpMath

com.opmath.test.dmldoc
Class AddressServlet

java.lang.Object
  |
  +--javax.servlet.GenericServlet
        |
        +--javax.servlet.http.HttpServlet
              |
              +--com.opmath.util.http.HttpServlet
                    |
                    +--com.opmath.test.dmldoc.AddressServlet
All Implemented Interfaces:
ParamIndex, Serializable, Servlet, ServletConfig

public class AddressServlet
extends HttpServlet

Example - a Servlet making use of DMLDoc and Jakarta Tomcat: demonstration of a web form validator. Demonstrates the use of DMLDoc, as contained within Open Math Utilities v 011 with Jakarta Tomcat 4.0 / Servlet 2.3 API.

Copyright: (c) 2002 The Open Math Company Limited

The Terms of Distribution of this software are stipulated in the javadoc Overview for this project.

Since:
J2SE 1.3.0, Java Servlet 2.3
Version:
expdmldoc-v011
Author:
Bruno Beloff bruno.beloff@opmath.com
See Also:
Serialized Form

Field Summary
static String TPL_DIR
          The absolute file path to the HTML templates used by the servlet.
 
Fields inherited from class com.opmath.util.http.HttpServlet
EOL, LOGON_DONE, LOGON_TARGET
 
Constructor Summary
AddressServlet()
           
 
Method Summary
 void destroy()
          Releases the servlet's resources, including the mail client.
 String doGetDispatch(HttpServletRequest req)
          Responds to an HTTP GET request.
 String getServletInfo()
          Reports a summary of the servlet's identity.
 void init()
          Initialises the servlet.
 void log(String message)
           
 
Methods inherited from class com.opmath.util.http.HttpServlet
, doGet, doPost, doPostDispatch, getIndex, getParamIndex, getValueCount, paramIndices, paramMappings, paramNames, paramValues, registerIndex, registerIndices, report, setConfig, setConfig
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, service
 
Methods inherited from class javax.servlet.GenericServlet
getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletName, init, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TPL_DIR

public static String TPL_DIR

The absolute file path to the HTML templates used by the servlet. Should be initialised using the J2EE deployment descriptor using the parameter tplDir.

Constructor Detail

AddressServlet

public AddressServlet()
Method Detail

init

public void init()
          throws UnavailableException

Initialises the servlet. Invoked only by the servlet container.

Overrides:
init in class GenericServlet

doGetDispatch

public String doGetDispatch(HttpServletRequest req)
                     throws Exception

Responds to an HTTP GET request. Invoked by doGet(..) on the servlet's superclass.

Overrides:
doGetDispatch in class HttpServlet
Parameters:
req - a com.opmath.util.http.HttpServletRequest instantiated by the container.
Throws:
Exception - if the request could not be satisfied.

destroy

public void destroy()

Releases the servlet's resources, including the mail client. (Invoked only by the servlet container.)

Overrides:
destroy in class GenericServlet

getServletInfo

public String getServletInfo()

Reports a summary of the servlet's identity.

Overrides:
getServletInfo in class HttpServlet
Returns:
A String describing this servlet.

log

public void log(String message)
Overrides:
log in class GenericServlet

OpMath

Submit a bug or feature to Open Math
Copyright © 2002 Open Math Company Limited, Brighton, UK