|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.struts.action.RequestProcessor
org.strutsme.server.StrutsMERequestProcessor
public abstract class StrutsMERequestProcessor
A special purpuse RequestProcessor which operates both with "normal" clients and with mobile clients.
For "normal" clients StrutsMERequestProcessor just calles the appropiate method of the super class. Only for StrutsME requests a special method is executed.
The distinction between a "normal" Http request and a StrutsME request is
made basedon an additional Http parameter
Constants.IS_STRUTSME_REQUEST which the StrutsME client sends.
The StrutsMERequestProcessor also supports transparent mapping from arbitary objects to DTOs (Data Transfer Objects) which extend SerializationBase. For this the user has to specify the package name which contains the classes. This is done using an init-param in the web.xml.
Example: the "normal" class is named "com.sun.Pet" and the package prefix is "com.sun.dto." (note the trailing dot) than StrutsMERequestProcessor will map this to "com.sun.dto.Pet".
| Field Summary |
|---|
| Fields inherited from class org.apache.struts.action.RequestProcessor |
|---|
actions, appConfig, INCLUDE_PATH_INFO, INCLUDE_SERVLET_PATH, log, moduleConfig, servlet |
| Constructor Summary | |
|---|---|
StrutsMERequestProcessor()
|
|
| Method Summary | |
|---|---|
protected SerializerMapper |
createMapper()
Returns a SerializerMapper instance. |
protected void |
doForward(java.lang.String uri,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
In the case of a classical request, this method only calls super.doForward. |
void |
init(org.apache.struts.action.ActionServlet actionServlet,
org.apache.struts.config.ModuleConfig moduleConfiguration)
Initialize this request processor instance. |
protected org.apache.struts.action.ActionForward |
processActionPerform(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.apache.struts.action.Action action,
org.apache.struts.action.ActionForm form,
org.apache.struts.action.ActionMapping mapping)
Ask the specified Action instance to handle this request. |
protected void |
processForwardConfig(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.apache.struts.config.ForwardConfig forward)
Forward or redirect to the specified destination, by the specified mechanism. |
protected void |
processPopulate(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.apache.struts.action.ActionForm form,
org.apache.struts.action.ActionMapping mapping)
Populate the properties of the specified ActionForm
instance from the request parameters included with this request. |
protected boolean |
processValidate(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.apache.struts.action.ActionForm form,
org.apache.struts.action.ActionMapping mapping)
|
| Methods inherited from class org.apache.struts.action.RequestProcessor |
|---|
destroy, doInclude, getDebug, getInternal, getServletContext, internalModuleRelativeForward, internalModuleRelativeInclude, log, log, process, processActionCreate, processActionForm, processActionForward, processContent, processException, processForward, processInclude, processLocale, processMapping, processMultipart, processNoCache, processPath, processPreprocess, processRoles |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public StrutsMERequestProcessor()
| Method Detail |
|---|
public void init(org.apache.struts.action.ActionServlet actionServlet,
org.apache.struts.config.ModuleConfig moduleConfiguration)
throws javax.servlet.ServletException
Initialize this request processor instance.
init in class org.apache.struts.action.RequestProcessoractionServlet - The ActionServlet we are associated withmoduleConfiguration - The ModuleConfig we are associated with.
javax.servlet.ServletException - If an error occor during initialization
protected void processForwardConfig(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.apache.struts.config.ForwardConfig forward)
throws java.io.IOException,
javax.servlet.ServletException
Forward or redirect to the specified destination, by the specified
mechanism. This method uses a ForwardConfig object instead
an ActionForward.
processForwardConfig in class org.apache.struts.action.RequestProcessorrequest - The servlet request we are processingresponse - The servlet response we are creatingforward - The ForwardConfig controlling where we go next
java.io.IOException - if an input/output error occurs
javax.servlet.ServletException - if a servlet exception occurs
protected void doForward(java.lang.String uri,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws java.io.IOException,
javax.servlet.ServletException
doForward in class org.apache.struts.action.RequestProcessorjava.io.IOException
javax.servlet.ServletException
protected final org.apache.struts.action.ActionForward processActionPerform(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.apache.struts.action.Action action,
org.apache.struts.action.ActionForm form,
org.apache.struts.action.ActionMapping mapping)
throws java.io.IOException,
javax.servlet.ServletException
Ask the specified Action instance to handle this request.
Return the ActionForward instance (if any) returned by the
called Action for further processing.
processActionPerform in class org.apache.struts.action.RequestProcessorrequest - The servlet request we are processingresponse - The servlet response we are creatingaction - The Action instance to be usedform - The ActionForm instance to pass to this Actionmapping - The ActionMapping instance to pass to this Action
java.io.IOException - if an input/output error occurs
javax.servlet.ServletException - if a servlet exception occurs
protected final void processPopulate(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.apache.struts.action.ActionForm form,
org.apache.struts.action.ActionMapping mapping)
throws javax.servlet.ServletException
Populate the properties of the specified ActionForm
instance from the request parameters included with this request. In
addition, request attribute Globals.CANCEL_KEY will be set
if the request was submitted with a button created by
CancelTag.
processPopulate in class org.apache.struts.action.RequestProcessorrequest - The servlet request we are processingresponse - The servlet response we are creatingform - The ActionForm instance we are populatingmapping - The ActionMapping we are using
javax.servlet.ServletException - if thrown by RequestUtils.populate()
protected SerializerMapper createMapper()
throws javax.servlet.ServletException
javax.servlet.ServletException - if the packagePrefix wasn't configured
protected boolean processValidate(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.apache.struts.action.ActionForm form,
org.apache.struts.action.ActionMapping mapping)
throws java.io.IOException,
javax.servlet.ServletException,
org.apache.struts.action.InvalidCancelException
processValidate in class org.apache.struts.action.RequestProcessorjava.io.IOException
javax.servlet.ServletException
org.apache.struts.action.InvalidCancelException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||