biz.hammurapi.web
Class ActionServlet
java.lang.Object
javax.servlet.GenericServlet
javax.servlet.http.HttpServlet
biz.hammurapi.web.StylingServlet
biz.hammurapi.web.DispatchingServlet
biz.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
|
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 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 |
ActionServlet
public ActionServlet()
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.