org.alltimeflashdreamer.filelister
Class AbstractFileListerServlet

java.lang.Object
  extended byjavax.servlet.GenericServlet
      extended byjavax.servlet.http.HttpServlet
          extended byorg.alltimeflashdreamer.filelister.AbstractFileListerServlet
All Implemented Interfaces:
Serializable, Servlet, ServletConfig
Direct Known Subclasses:
FileListerControllerServlet, FileListerDownloadServlet, FileListerViewerServlet

public abstract class AbstractFileListerServlet
extends HttpServlet

Title: AbstractFileListerServlet

Description: This servlet is the superclass of each FileLister servlet and provides the commonly used methods for the extending classes, such as the printing of the error site(s) or the DimDom access method.

Organization: All Time Flash Dreamer

Version:
0.5.1
Author:
Copyright (c) 2002-2004 by Florian Steinsiepe
See Also:
Serialized Form

Field Summary
static String CONFIGCLASSNAME
          Stores the name of the config class for quick access by extending classes
 
Constructor Summary
AbstractFileListerServlet()
           
 
Method Summary
 void doGet(HttpServletRequest request, HttpServletResponse response)
          Redirects the client to the doPost method, so it doesn't matter whether the call was through the get or the post method.
abstract  void doPost(HttpServletRequest request, HttpServletResponse response)
          (abstract declaration, to be implemented by extending classes)
static void showErrorSite(FileListerException fle, HttpServletResponse response, FileListerConfig fileListerConfig)
          Initializes the appropriate procedure to show the given error to the user.
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doHead, doOptions, 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

CONFIGCLASSNAME

public static final String CONFIGCLASSNAME
Stores the name of the config class for quick access by extending classes

Constructor Detail

AbstractFileListerServlet

public AbstractFileListerServlet()
Method Detail

doGet

public void doGet(HttpServletRequest request,
                  HttpServletResponse response)
           throws ServletException,
                  IOException
Redirects the client to the doPost method, so it doesn't matter whether the call was through the get or the post method.

Parameters:
request - the request object to read URL stuff from
response - the response object to send stuff to
Throws:
ServletException - as defined in the superclass
IOException - as defined in the superclass

doPost

public abstract void doPost(HttpServletRequest request,
                            HttpServletResponse response)
                     throws ServletException,
                            IOException
(abstract declaration, to be implemented by extending classes)

Parameters:
request - the request object to read URL stuff from
response - the response object to send stuff to
Throws:
ServletException - as defined in the superclass
IOException - as defined in the superclass

showErrorSite

public static void showErrorSite(FileListerException fle,
                                 HttpServletResponse response,
                                 FileListerConfig fileListerConfig)
                          throws ServletException,
                                 IOException
Initializes the appropriate procedure to show the given error to the user.

Parameters:
fle - the FileListerException to show
response - the response to use for redirects
fileListerConfig - the magic config object
Throws:
ServletException - if the ErrorSiteProcessor itself catches an exception
IOException - if the redirect to the error site somehow failed