org.apache.aries.samples.blog.web.util
Class FormServlet

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by org.apache.aries.samples.blog.web.util.FormServlet
All Implemented Interfaces:
Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig
Direct Known Subclasses:
CreateBlogEntryForm, EditAuthorForm

public abstract class FormServlet
extends javax.servlet.http.HttpServlet

See Also:
Serialized Form

Field Summary
static String ERROR_MESSAGES_ID
           
 
Constructor Summary
protected FormServlet(String id)
           
 
Method Summary
static void addError(javax.servlet.http.HttpServletRequest req, String error)
           
protected  void doGet(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp)
           
protected abstract  String getPageTitle(javax.servlet.http.HttpServletRequest req)
           
protected  String retrieveOrEmpty(javax.servlet.http.HttpServletRequest req, String param)
           
static void storeParam(javax.servlet.http.HttpServletRequest req, String id, String param, String value)
           
protected abstract  void writeCustomHeaderContent(javax.servlet.http.HttpServletRequest req, PrintWriter out)
           
protected abstract  void writeForm(javax.servlet.http.HttpServletRequest req, PrintWriter out)
           
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPost, 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
 

Field Detail

ERROR_MESSAGES_ID

public static final String ERROR_MESSAGES_ID
See Also:
Constant Field Values
Constructor Detail

FormServlet

protected FormServlet(String id)
Method Detail

addError

public static void addError(javax.servlet.http.HttpServletRequest req,
                            String error)

storeParam

public static void storeParam(javax.servlet.http.HttpServletRequest req,
                              String id,
                              String param,
                              String value)

writeCustomHeaderContent

protected abstract void writeCustomHeaderContent(javax.servlet.http.HttpServletRequest req,
                                                 PrintWriter out)

writeForm

protected abstract void writeForm(javax.servlet.http.HttpServletRequest req,
                                  PrintWriter out)
                           throws IOException
Throws:
IOException

getPageTitle

protected abstract String getPageTitle(javax.servlet.http.HttpServletRequest req)
                                throws IOException
Throws:
IOException

retrieveOrEmpty

protected String retrieveOrEmpty(javax.servlet.http.HttpServletRequest req,
                                 String param)

doGet

protected void doGet(javax.servlet.http.HttpServletRequest req,
                     javax.servlet.http.HttpServletResponse resp)
              throws javax.servlet.ServletException,
                     IOException
Overrides:
doGet in class javax.servlet.http.HttpServlet
Throws:
javax.servlet.ServletException
IOException


Copyright © 2009-2012 The Apache Software Foundation. All Rights Reserved.