OpMath

com.opmath.mail
Class SendServlet

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

public class SendServlet
extends HttpServlet

A servlet front-end for the MailClient component.

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:
Reporter v1.0
Author:
Bruno Beloff bruno.beloff@opmath.com
See Also:
Serialized Form

Field Summary
static String IMG_DIR
          The absolute local file path to the image file used by the servlet as an email attachment.
static String MAIL_FROM_ADDR
          The email from address for the 'user' sending mail messages.
static String MAIL_FROM_NAME
          The email user name for the 'user' sending mail messages.
static String MAIL_SERVER
          The URI of the SMTP mail server used by this servlet.
static String TPL_DIR
          The absolute local 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
SendServlet()
           
 
Method Summary
 void destroy()
          Release the servlet's resources, including the mail client.
 String doGetDispatch(HttpServletRequest req)
          Respond to an HTTP GET request.
 String getServletInfo()
          Reports a summary of the servlet's identity.
 void init()
          Initialise the servlet.
 
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, 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 local file path to the HTML templates used by the servlet. Should be initialised using web.xml.

Since:
J2SE 1.3

IMG_DIR

public static String IMG_DIR

The absolute local file path to the image file used by the servlet as an email attachment. Should be initialised using web.xml.

Since:
J2SE 1.3

MAIL_SERVER

public static String MAIL_SERVER

The URI of the SMTP mail server used by this servlet. Should be initialised using web.xml.

Since:
J2SE 1.3

MAIL_FROM_ADDR

public static String MAIL_FROM_ADDR

The email from address for the 'user' sending mail messages. Should be initialised using web.xml.

Since:
J2SE 1.3

MAIL_FROM_NAME

public static String MAIL_FROM_NAME

The email user name for the 'user' sending mail messages. Should be initialised using web.xml.

Since:
J2SE 1.3
Constructor Detail

SendServlet

public SendServlet()
Method Detail

init

public void init()
          throws ServletException,
                 UnavailableException

Initialise the servlet. Involked only by the servlet container.

Overrides:
init in class GenericServlet
Throws:
ServletException - not explicitly thrown within this method.
UnavailableException - if the servlet could not be initialised.
Since:
J2SE 1.3

destroy

public void destroy()

Release the servlet's resources, including the mail client. (Involked only by the servlet container.)

Overrides:
destroy in class GenericServlet
Since:
J2SE 1.3

doGetDispatch

public String doGetDispatch(HttpServletRequest req)
                     throws Exception

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

Overrides:
doGetDispatch in class HttpServlet
Parameters:
conf - a ServletConfig instantiated by the container.
Throws:
ServletException - if the servlet could not be initialised.
Since:
J2SE 1.3

getServletInfo

public String getServletInfo()

Reports a summary of the servlet's identity.

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

OpMath

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