janus.web
Class ServletBase

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by janus.web.ServletBase
All Implemented Interfaces:
Serializable, Servlet, ServletConfig
Direct Known Subclasses:
LogfileServlet, StatusServlet

public abstract class ServletBase
extends HttpServlet

Abstrakte Basisklasse für Servlets.
Die abgeleiteten Klassen implementieren nur die Methode processRequest, in der ein von Processor abgeleitetes Objekt erstellt und dessen processRequest-Methode aufgerufen wird.

See Also:
Serialized Form

Nested Class Summary
protected  class ServletBase.Processor
          Pro Request wird ein neues Processor-Objekt erstellt, damit das thread-sichere Abarbeiten mehrerer paralleler Abfragen möglich ist.
 
Field Summary
static String appServer
          Name des Application-Servers
 
Constructor Summary
ServletBase()
           
 
Method Summary
 void doGet(HttpServletRequest req, HttpServletResponse resp)
           
 void doPost(HttpServletRequest req, HttpServletResponse resp)
           
protected abstract  void processRequest(ServletContext context, HttpServletRequest req, HttpServletResponse resp, boolean processingGet)
          Diese Methode muss in den abgeleiteten Klassen ein jeweiliges Processor-Objekt erzeugen und dessen processRequest-Methode aufrufen.
 
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

appServer

public static String appServer
Name des Application-Servers

Constructor Detail

ServletBase

public ServletBase()
Method Detail

doGet

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

doPost

public void doPost(HttpServletRequest req,
                   HttpServletResponse resp)
            throws IOException
Overrides:
doPost in class HttpServlet
Throws:
IOException
See Also:
HttpServlet.doPost(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)

processRequest

protected abstract void processRequest(ServletContext context,
                                       HttpServletRequest req,
                                       HttpServletResponse resp,
                                       boolean processingGet)
Diese Methode muss in den abgeleiteten Klassen ein jeweiliges Processor-Objekt erzeugen und dessen processRequest-Methode aufrufen.

Parameters:
context - der Servlet-Context zum Finden des HTML-Templates.
req - der Request, der die Parameter enth�lt.
resp - das Response-Objekt zur Erstellung eines Ausgabe-Streams.
processingGet - true, wenn ein GET-Request abgearbeitet wird.


Copyright © 2008 MvC Systemsoftware.