You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bridges-user@portals.apache.org by Evert Lammerts <Ev...@sara.nl> on 2009/02/19 13:25:50 UTC
request phase
Hi list,
Using the Apache struts bridge (within the Liferay 5.1.2 portlet container
on Tomcat 6.0), how can I distinguish the phase of the request in my Action
class? Iow, when does the javax.portlet.request attribute of the
ServletRequest contain a RenderRequest, and when does it contain an
ActionRequest? I keep getting cast exceptions here:
ActionRequest aReq = (ActionRequest)
req.getAttribute("javax.portlet.request");
Best,
Evert Lammerts
Evert Lammerts
SARA Computing & Network Services
High Performance Computing & Visualization
Phone: +31 20 888 4101
Email: evert.lammerts@sara.nl
Re: request phase
Posted by Ate Douma <at...@douma.nu>.
Evert Lammerts wrote:
> Hi list,
>
>
>
> Using the Apache struts bridge (within the Liferay 5.1.2 portlet
> container on Tomcat 6.0), how can I distinguish the phase of the request
> in my Action class? Iow, when does the javax.portlet.request attribute
> of the ServletRequest contain a RenderRequest, and when does it contain
> an ActionRequest? I keep getting cast exceptions here:
>
>
>
> ActionRequest aReq = (ActionRequest)
> req.getAttribute("javax.portlet.request");
if (req.getAttribute(StrutsPortlet.REQUEST_TYPE).equals(StrutsPortlet.ACTION_REQUEST)) {
ActionRequest aReq = (ActionRequest).req.getAttribute("javax.portlet.request");
}
else {
RenderRequest rReq = (RenderRequest).req.getAttribute("javax.portlet.request");
}
Note: the above assumes JSR-168., not yet JSR-286 interactions.
JSR-286 Portlet 2.0 adds req.getAttribute(PortletRequest.LIFECYCLE_PHASE) as a standardization of the above.
HTH,
Ate
>
>
>
> Best,
>
> Evert Lammerts
>
>
>
> Evert Lammerts
>
> SARA Computing & Network Services
>
> High Performance Computing & Visualization
>
>
>
> Phone: +31 20 888 4101
>
> Email: evert.lammerts@sara.nl
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: bridges-user-unsubscribe@portals.apache.org
For additional commands, e-mail: bridges-user-help@portals.apache.org