biz.hammurapi.web
Class ActionServlet

java.lang.Object
  extended byjavax.servlet.GenericServlet
      extended byjavax.servlet.http.HttpServlet
          extended bybiz.hammurapi.web.StylingServlet
              extended bybiz.hammurapi.web.DispatchingServlet
                  extended bybiz.hammurapi.web.ActionServlet
All Implemented Interfaces:
java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

public class ActionServlet
extends DispatchingServlet

Action servlet invokes action methods. Action method is any method which takes 3 parameters: HttpServletRequest, HttpServletResponse, ActionServlet or 2 parameters HttpServletRequest, HttpServletResponse Return value of action method is processed in the following way: a) If it is instance of Forward then forward is performed b) If it is instance of String then it is gets written to response output stream. c) Otherwise it is XML-ized and then styled.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class biz.hammurapi.web.StylingServlet
StylingServlet.TransformCommand
 
Field Summary
 
Fields inherited from class biz.hammurapi.web.StylingServlet
parameterizer
 
Constructor Summary
ActionServlet()
           
 
Method Summary
 java.lang.Object getActionInstance(java.lang.Class actionClass, java.lang.String profile)
           
protected  java.lang.Object getActionInstance(java.lang.String path)
          Extracts instance name from the path and returns instance for the path.
protected  java.lang.String getActionName(java.lang.String path)
           
 void init(javax.servlet.ServletConfig config)
           
protected  int styleSeparatorPosition()
           
 
Methods inherited from class biz.hammurapi.web.DispatchingServlet
doGet, doPost, executeAction, getDomSerializer, processRequest, style, style, verifyMethod
 
Methods inherited from class biz.hammurapi.web.StylingServlet
getSetParametersCallback, getTransformer, newDocumentBuilder
 
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, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ActionServlet

public ActionServlet()
Method Detail

init

public void init(javax.servlet.ServletConfig config)
          throws javax.servlet.ServletException
Specified by:
init in interface javax.servlet.Servlet
Overrides:
init in class DispatchingServlet
Throws:
javax.servlet.ServletException

getActionInstance

protected java.lang.Object getActionInstance(java.lang.String path)
                                      throws HammurapiWebException
Extracts instance name from the path and returns instance for the path.

Specified by:
getActionInstance in class DispatchingServlet
Returns:
Object to invoke action methods
Throws:
HammurapiWebException

getActionName

protected java.lang.String getActionName(java.lang.String path)
                                  throws HammurapiWebException
Specified by:
getActionName in class DispatchingServlet
Parameters:
path -
Returns:
Action method name
Throws:
HammurapiWebException

styleSeparatorPosition

protected int styleSeparatorPosition()
Specified by:
styleSeparatorPosition in class DispatchingServlet
Returns:
Position of "/" in the servlet path info which separates action name from style info.

getActionInstance

public java.lang.Object getActionInstance(java.lang.Class actionClass,
                                          java.lang.String profile)
                                   throws HammurapiWebException
Throws:
HammurapiWebException


Copyright © 2006 Hammurapi Group. All Rights Reserved.