Tynamo™-TINI
v1.0.4

com.qindesign.servlet
Class SendMailServlet

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by com.qindesign.servlet.SendMailServlet
All Implemented Interfaces:
Serializable, Servlet, ServletConfig

public class SendMailServlet
extends HttpServlet

Example servlet that processes POST requests to mail things. This uses the mailTo initialization parameter.

Version:
1.0.4
Author:
Shawn Silverman
See Also:
Serialized Form

Constructor Summary
SendMailServlet()
           
 
Method Summary
protected  void doPost(HttpServletRequest req, HttpServletResponse resp)
          This method will be called when a mail request is posted to this servlet.
 void init()
          Checks the "mailTo" initialization parameter for the target email address.
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doGet, doOptions, doPut, doTrace, getLastModified, service, service
 
Methods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SendMailServlet

public SendMailServlet()
Method Detail

init

public void init()
          throws ServletException
Checks the "mailTo" initialization parameter for the target email address. All emails will be sent to this address.

Overrides:
init in class GenericServlet
Throws:
ServletException - if this parameter is not set.

doPost

protected void doPost(HttpServletRequest req,
                      HttpServletResponse resp)
               throws ServletException,
                      IOException
This method will be called when a mail request is posted to this servlet.

Certain request properties are of interest:

Overrides:
doPost in class HttpServlet
Throws:
ServletException
IOException

Tynamo™-TINI
v1.0.4

© 2001-2007 Shawn Silverman