|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object RequestProcessor com.ibm.portal.struts.portlet.WpRequestProcessor
public class WpRequestProcessor
WpRequestProcessor contains the processing logic that the Struts controller portlet performs as it receives each request from the container. The WpRequestProcessor is a customized version of the base Struts RequestProcessor to allow the Struts application to execute in Portal. This class or subclasses must be the Struts request processor used for Struts applications in portal. The WpRequestProcessor 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
Commons Logging instance for this class |
protected static MessageResources |
messages
The message resources for the Struts Portlet Framework. |
Constructor Summary | |
---|---|
WpRequestProcessor()
WpRequestProcessor constructor |
Method Summary | |
---|---|
protected void |
doForward(java.lang.String uri,
HttpServletRequest request,
HttpServletResponse response)
Forwards are not directly supported in Portal. |
protected void |
doInclude(java.lang.String uri,
HttpServletRequest request,
HttpServletResponse response)
Do an include of specified uri. |
java.lang.String |
getApplicationPrefix()
Get the application prefix associated with this command processor. |
protected ModuleContext |
getModuleContext()
Return the module context object |
protected ServletContext |
getServletContext()
Returns the servlet context object |
StrutsInfo |
getStrutsInfo()
Get the StrutsInfo object associated with this
command processor. |
void |
init(ActionServlet servlet,
ModuleConfig moduleConfig)
Initialize this request processor instance. |
protected ActionForward |
processActionPerform(HttpServletRequest request,
HttpServletResponse response,
Action action,
ActionForm form,
ActionMapping mapping)
Ask the specified Action instance to handle this
request. |
protected void |
processContent(HttpServletRequest request,
HttpServletResponse response)
Override the default function to do nothing since we set the content type elsewhere. |
protected ActionForward |
processException(HttpServletRequest request,
HttpServletResponse response,
java.lang.Exception exception,
ActionForm form,
ActionMapping mapping)
This implementation calls the super implementation. |
protected void |
processForwardConfig(HttpServletRequest request,
HttpServletResponse response,
ForwardConfig forward)
This implementation will process the ForwardConfig and then call 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,
PortletRequest request,
PortletResponse response,
ServletContext servletContext)
This method will implement the necessary steps to simulate a forward to a Struts Action. |
protected void |
processNoCache(HttpServletRequest request,
HttpServletResponse response)
This method does not call the Struts Request Processor processNoCache implementation. |
protected void |
processPopulate(HttpServletRequest request,
HttpServletResponse response,
ActionForm form,
ActionMapping mapping)
Calls the inherited processPopulate. |
protected boolean |
processRoles(HttpServletRequest request,
HttpServletResponse response,
ActionMapping mapping)
This method will call the super implementation for processing J2EE roles. |
protected java.lang.String |
processUri(HttpServletRequest request,
HttpServletResponse response)
Identify and return the path component from the request URI. |
void |
setServletContext(ServletContext sContext)
Set 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 WpRequestProcessor()
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 occor 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
WpsStrutsException
then response.sendError
with the exception information is called.
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
null
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
null
java.io.IOException
- if an input/output error occursprotected void processNoCache(HttpServletRequest request, HttpServletResponse response)
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
- if an input/output error occurs
ServletException
- if a servlet exception occursprotected 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
- if an input/output error occurs
ServletException
- if a servlet exception occurspublic static void processNewActionUri(java.lang.String uri, PortletRequest request, PortletResponse response, ServletContext servletContext) throws java.io.IOException, ServletException
ViewCommandFactory
.
uri
- the new URIrequest
- the requestresponse
- the response
java.io.IOException
- if an input/output error occurs
ServletException
- if a servlet exception occurspublic void setServletContext(ServletContext sContext)
sContext
- the servlet context objectprotected ServletContext getServletContext()
null
if not setpublic StrutsInfo getStrutsInfo()
StrutsInfo
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 occursprotected void processContent(HttpServletRequest request, HttpServletResponse response)
StrutsViewCommand.execute(RenderRequest, RenderResponse, ViewCommandExecutionContext)
,
org.apache.struts.action.RequestProcessor#processContent(javax.servlet.http.HttpServletRequest,
javax.servlet.http.HttpServletResponse)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |