|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object RequestProcessor com.ibm.wps.portlets.struts.WpsRequestProcessor
public class WpsRequestProcessor
WpsRequestProcessor contains the processing logic that the Struts controller portlet performs as it receives each request from the container. The WpsRequestProcessor is a customized version of the base Struts RequestProcessor that allows the Struts application to execute in Portal. This class or subclasses must be the Struts request processor used for Struts applications in portal. The WpsRequestProcessor class can be extended to support customizing the Struts processing in Portal, but the super method implementations should be invoked.
Field Summary | |
---|---|
protected static Log |
log
The commons-logging instance for this class. |
protected static MessageResources |
messages
The message resources for the Struts Portlet Framework. |
Constructor Summary | |
---|---|
WpsRequestProcessor()
WpsRequestProcessor constructor. |
Method Summary | |
---|---|
protected void |
doForward(java.lang.String uri,
HttpServletRequest request,
HttpServletResponse response)
Calls doInclude. |
protected void |
doInclude(java.lang.String uri,
HttpServletRequest request,
HttpServletResponse response)
Includes a specified URI. |
java.lang.String |
getApplicationPrefix()
Gets the application prefix associated with this command processor. |
protected ModuleContext |
getModuleContext()
Returns the module context object. |
protected ServletContext |
getServletContext()
Returns the servlet context object. |
WpsStrutsInfo |
getStrutsInfo()
Gets the WpsStrutsInfo object associated with this
command processor. |
void |
init(ActionServlet servlet,
ModuleConfig moduleConfig)
Initializes this request processor instance. |
protected ActionForward |
processActionPerform(HttpServletRequest request,
HttpServletResponse response,
Action action,
ActionForm form,
ActionMapping mapping)
Asks the specified Action instance to handle this
request. |
protected ActionForward |
processException(HttpServletRequest request,
HttpServletResponse response,
java.lang.Exception exception,
ActionForm form,
ActionMapping mapping)
Calls the super implementation. |
protected void |
processForwardConfig(HttpServletRequest request,
HttpServletResponse response,
ForwardConfig forward)
Processes the ForwardConfig and then calls doFoward. |
protected ActionMapping |
processMapping(HttpServletRequest request,
HttpServletResponse response,
java.lang.String path)
Calls the super processMapping implementation. |
protected HttpServletRequest |
processMultipart(HttpServletRequest request)
If this is a multipart request, wrap it with a special wrapper. |
static void |
processNewActionUri(java.lang.String uri,
HttpServletRequest request,
HttpServletResponse response,
ServletContext servletContext)
Simulates a forward to a Struts action. |
protected void |
processNoCache(HttpServletRequest request,
HttpServletResponse response)
This method is overridden so that the Struts request processor processNoCache method is not called. |
protected void |
processPopulate(HttpServletRequest request,
HttpServletResponse response,
ActionForm form,
ActionMapping mapping)
Calls the inherited processPopulate. |
protected boolean |
processRoles(HttpServletRequest request,
HttpServletResponse response,
ActionMapping mapping)
Calls the super implementation for processing J2EE roles. |
protected java.lang.String |
processUri(HttpServletRequest request,
HttpServletResponse response)
Identifies and returns the path component from the request URI. |
void |
setServletContext(ServletContext sContext)
Sets the servlet context. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static MessageResources messages
protected static Log log
Constructor Detail |
---|
public WpsRequestProcessor()
Method Detail |
---|
protected HttpServletRequest processMultipart(HttpServletRequest request)
request
- The HttpServletRequest we are processing
public void init(ActionServlet servlet, ModuleConfig moduleConfig) throws ServletException
servlet
- The ActionServlet we are associated withmoduleConfig
- The ModuleConfig we are associated with.
ServletException
- If an error occurs during initializationprotected ModuleContext getModuleContext()
protected ActionForward processActionPerform(HttpServletRequest request, HttpServletResponse response, Action action, ActionForm form, ActionMapping mapping) throws java.io.IOException, ServletException
Action
instance to handle this
request. Return the ActionForward
instance (if any)
returned by the called Action
for further processing.
This implementation will also check for the Portal friendly StrutsAction
class and call the execute method with the portlet objects instead of the
http servlet interfaces.
request
- 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
ServletException
- if a servlet exception occursprotected void processForwardConfig(HttpServletRequest request, HttpServletResponse response, ForwardConfig forward) throws java.io.IOException, ServletException
request
- The servlet request we are processingresponse
- The servlet response we are creatingforward
- The ActionForward controlling where we go next
java.io.IOException
- if an input/output error occurs
ServletException
- if a servlet exception occursprotected ActionForward processException(HttpServletRequest request, HttpServletResponse response, java.lang.Exception exception, ActionForm form, ActionMapping mapping) throws java.io.IOException, ServletException
request
- The servlet request we are processingresponse
- The servlet response we are processingexception
- The exception being handledform
- The ActionForm we are processingmapping
- The ActionMapping we are using
java.io.IOException
- if an input/output error occurs
ServletException
- if a servlet exception occursprotected ActionMapping processMapping(HttpServletRequest request, HttpServletResponse response, java.lang.String path) throws java.io.IOException
request
- The servlet request we are processingresponse
- The servlet response we are creatingpath
- The portion of the request URI for selecting a mapping
java.io.IOException
- if an input/output error occursprotected void processNoCache(HttpServletRequest request, HttpServletResponse response)
processNoCache
method is not called.
This method is a no-op in Portal.
request
- The servlet request we are processingresponse
- The servlet response we are creatingprotected void doForward(java.lang.String uri, HttpServletRequest request, HttpServletResponse response) throws java.io.IOException, ServletException
uri
- Uri or Definition name to forwardrequest
- Current page requestresponse
- Current page response
java.io.IOException
ServletException
protected void doInclude(java.lang.String uri, HttpServletRequest request, HttpServletResponse response) throws java.io.IOException, ServletException
uri
- Uri of page to includerequest
- Current page requestresponse
- Current page response
java.io.IOException
ServletException
public static void processNewActionUri(java.lang.String uri, HttpServletRequest request, HttpServletResponse response, ServletContext servletContext) throws java.io.IOException, ServletException
ViewCommandFactory
.
uri
- the new URIrequest
- the requestresponse
- the response
java.io.IOException
ServletException
public void setServletContext(ServletContext sContext)
sContext
- the servlet context objectprotected ServletContext getServletContext()
null
if not setpublic WpsStrutsInfo getStrutsInfo()
WpsStrutsInfo
object associated with this
command processor.
public java.lang.String getApplicationPrefix()
null
protected boolean processRoles(HttpServletRequest request, HttpServletResponse response, ActionMapping mapping) throws java.io.IOException, ServletException
request
- The servlet request we are processingresponse
- The servlet response we are creatingmapping
- The mapping we are using
java.io.IOException
- if an input/output error occurs
ServletException
- if a servlet exception occursprotected void processPopulate(HttpServletRequest request, HttpServletResponse response, ActionForm form, ActionMapping mapping) throws ServletException
request
- The servlet request we are processingresponse
- The servlet response we are creatingform
- The ActionForm instance we are populatingmapping
- The ActionMapping we are using
ServletException
- if thrown by RequestUtils.populate()protected java.lang.String processUri(HttpServletRequest request, HttpServletResponse response) throws java.io.IOException
null
.
request
- The servlet request we are processingresponse
- The servlet response we are creating
java.io.IOException
- if an input/output error occurs
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |