|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--javax.servlet.GenericServlet | +--javax.servlet.http.HttpServlet | +--org.apache.struts.action.ActionServlet | +--org.apache.struts.tiles.ActionComponentServlet
Action Servlet to be used with Tiles and Struts 1.0.x. For Struts 1.1, use TilesPlugin and eventualy TilesRequestProcessor. This servlet extends struts one. It adds channels and screens dispatching capabilities. We overide all methods that do request forward (i.e. 'processActionForward' and 'processValidate') in order to call a new method performing forward. In fact, we copy methods to overide, and change lines doing forward which now call 'processForward()'. Rest of the method is unchanged. This new method could now be overiden in order to dispatch request before forwarding. Compliant to ActionServlet from struts 2001/06/25 00:02:27
Field Summary | |
private DefinitionsFactory |
definitionsFactory
Deprecated. Definitions factory |
Fields inherited from class org.apache.struts.action.ActionServlet |
config, configDigester, convertNull, dataSources, debug, internal, internalName, log, processor, registrations, servletMapping, servletName |
Constructor Summary | |
ActionComponentServlet()
Deprecated. |
Method Summary | |
protected void |
doForward(java.lang.String uri,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Deprecated. Do a forward, and eventually catch uri containing Tiles definition. |
void |
init()
Deprecated. Init method. |
void |
initComponentDefinitionsMapping()
Deprecated. Read component instance mapping configuration file. |
protected void |
processActionForward(ActionForward forward,
ActionMapping mapping,
ActionForm formInstance,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Deprecated. Overload struts1.0 counterpart in order to catch forward calls. |
protected boolean |
processForward(ActionMapping mapping,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Deprecated. Overload struts1.0 counterpart in order to catch forward calls. |
protected void |
processForward(java.lang.String uri,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Deprecated. use doForward instead |
protected boolean |
processInclude(ActionMapping mapping,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Deprecated. Overload struts1.0 counterpart in order to catch include calls. |
protected boolean |
processValidate(ActionMapping mapping,
ActionForm formInstance,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Deprecated. Overload struts1.0 counterpart in order to catch forward calls. |
Methods inherited from class javax.servlet.http.HttpServlet |
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, service |
Methods inherited from class javax.servlet.GenericServlet |
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 |
Field Detail |
private DefinitionsFactory definitionsFactory
Constructor Detail |
public ActionComponentServlet()
Method Detail |
public void init() throws javax.servlet.ServletException
init
in class ActionServlet
javax.servlet.ServletException
- if we cannot configure ourselves correctlypublic void initComponentDefinitionsMapping() throws javax.servlet.ServletException
javax.servlet.ServletException
protected void processActionForward(ActionForward forward, ActionMapping mapping, ActionForm formInstance, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws java.io.IOException, javax.servlet.ServletException
ActionForward
instance was returned by the
Action
.
forward
- The ActionForward returned by our actionmapping
- The ActionMapping we are processingformInstance
- The ActionForm we are processingrequest
- The servlet request we are processingresponse
- The servlet response we are creating
java.io.IOException
- if an input/output error occurs
javax.servlet.ServletException
- if a servlet exception occursprotected boolean processValidate(ActionMapping mapping, ActionForm formInstance, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws java.io.IOException, javax.servlet.ServletException
validate()
method of the specified ActionForm,
and forward back to the input form if there are any errors. Return
true
if we should continue processing (and call the
Action
class perform()
method), or return
false
if we have already forwarded control back to the
input form.
mapping
- The ActionMapping we are processingformInstance
- The ActionForm we are processingrequest
- The servlet request we are processingresponse
- The servlet response we are processing
java.io.IOException
- if an input/output error occurs
javax.servlet.ServletException
- if a servlet exception occursprotected boolean processForward(ActionMapping mapping, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws java.io.IOException, javax.servlet.ServletException
true
if processing of this request should continue (i.e.
be processed by an Action class), or false
if we have
already handled this request.
mapping
- The ActionMapping we are processingrequest
- The request we are processingresponse
- The response we are processing
java.io.IOException
- if the included resource throws an exception
javax.servlet.ServletException
- if the included resource throws an
exceptionprotected boolean processInclude(ActionMapping mapping, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws java.io.IOException, javax.servlet.ServletException
true
if processing of this request should continue (i.e.
be processed by an Action class), or false
if we have
already handled this request.
mapping
- The ActionMapping we are processingrequest
- The request we are processingresponse
- The response we are processing
java.io.IOException
- if the included resource throws an exception
javax.servlet.ServletException
- if the included resource throws an
exceptionprotected void processForward(java.lang.String uri, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws java.io.IOException, javax.servlet.ServletException
uri
- Uri or Definition name to forwardrequest
- Current page requestresponse
- Current page response
java.io.IOException
javax.servlet.ServletException
protected void doForward(java.lang.String uri, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws java.io.IOException, javax.servlet.ServletException
uri
- Uri or Definition name to forwardrequest
- Current page requestresponse
- Current page response
java.io.IOException
javax.servlet.ServletException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |