org.mmbase.servlet
Class SimpleFormToMailServlet

java.lang.Object
  |
  +--javax.servlet.GenericServlet
        |
        +--javax.servlet.http.HttpServlet
              |
              +--org.mmbase.servlet.JamesServlet
                    |
                    +--org.mmbase.servlet.SimpleFormToMailServlet
All Implemented Interfaces:
java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

public abstract class SimpleFormToMailServlet
extends JamesServlet

Post Servlet a example of how to use different Post methods This servlet will mail a form to a (set of) specified user(s). Inherit from it (its abstract), specify the methods: public abstract String getSubject(); public abstract String getToEmailAddress(); and the form will be mailed.

Version:
2.0.1
Author:
marmaa@vpro.nl (Marcel Maatkamp)
See Also:
Serialized Form

Field Summary
protected  SendMailInterface sendmail
           
 
Constructor Summary
SimpleFormToMailServlet()
           
 
Method Summary
protected  java.lang.String getentries(HttpPost post)
           
 java.lang.String getHtmlFooter()
           
 java.lang.String getHtmlHeader(java.lang.String title)
          Produces a 'standard' header of html-form.
 java.lang.String getServletInfo()
          Info method, provides the user/server with some basic info on this Servlet
abstract  java.lang.String getSubject()
           
abstract  java.lang.String getToEmailAddress()
           
 void init()
           
 void reload()
          reload
 void service(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
          service call will be called by the server when a request is done by a user.
 
Methods inherited from class org.mmbase.servlet.JamesServlet
debug, decRefCount, finalize, getAddress, getAuthorization, getAuthorization, getCookie, getInitParameters, getModule, getParam, getParamVector, getProperties, getProperty, getRequestURL, incRefCount, init, isInternalVPROAddress
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doGet, doOptions, doPost, doPut, doTrace, getLastModified, service
 
Methods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletName, log, log
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

sendmail

protected SendMailInterface sendmail
Constructor Detail

SimpleFormToMailServlet

public SimpleFormToMailServlet()
Method Detail

init

public void init()
Overrides:
init in class javax.servlet.GenericServlet

reload

public void reload()
reload

service

public void service(javax.servlet.http.HttpServletRequest req,
                    javax.servlet.http.HttpServletResponse res)
             throws javax.servlet.ServletException,
                    java.io.IOException
service call will be called by the server when a request is done by a user.
Overrides:
service in class javax.servlet.http.HttpServlet

getentries

protected java.lang.String getentries(HttpPost post)

getSubject

public abstract java.lang.String getSubject()

getToEmailAddress

public abstract java.lang.String getToEmailAddress()

getHtmlHeader

public java.lang.String getHtmlHeader(java.lang.String title)
Produces a 'standard' header of html-form. Override when in need for different layout.

getHtmlFooter

public java.lang.String getHtmlFooter()

getServletInfo

public java.lang.String getServletInfo()
Info method, provides the user/server with some basic info on this Servlet
Overrides:
getServletInfo in class javax.servlet.GenericServlet


MMBase 2001