Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Getting ServletRequest from PortletRequest

79 views
Skip to first unread message

Rohit Gupta

unread,
May 20, 2009, 9:55:00 PM5/20/09
to
While migrating the jsr168 portlets from WebSphere Portal 5.1 to WebSphere Portal 6.1 I encountered the following code which runs fine on WebSphere Portal 5.1. but when I try to run it on WebSphere Portal 6.1 its not able to find the org.apache.pluto.core.impl.RenderRequestImpl class.

In Portal 5.1 following code gives me ServletRequest from RenderRequest but is there any way to find the ServletRequest form RenderRequest?


HttpServletRequest hReq = ((org.apache.pluto.core.impl.RenderRequestImpl) request
.getAttribute("javax.portlet.request")).getHttpServletRequest();

RenderRequestWrapper rrw = (RenderRequestWrapper) hReq;
PortalRequestWrapper prw = (PortalRequestWrapper) rrw.getRequest();
ServletRequest sReq = (ServletRequest) prw.getRequest();

I will really appreciate your help.

Thanks,
Rohit

Jim Barnes

unread,
May 22, 2009, 10:48:26 AM5/22/09
to
well the code below was using internal implementation classes and is not really working with in the confines of the spec.

Given that the container drastically changed I am not surprised this does not work anymore

What do you need from the servletrequest?

IBM Certified System Administrator -- WebSphere Portal V6.0, V5.1, V5.0

IBM Certified Solution Developer -- WebSphere Portal V5.1, v6.0

The postings on this site are my own and do not necessarily represent the positions, strategies, or opinions of IBM

jennife...@harley-davidson.com

unread,
Jul 20, 2009, 1:57:24 PM7/20/09
to
I am having the same problem, so please pass along any solution. IBM Services wrote all our portlet code and our portal framework using RenderRequestImpl to get the HttpServletRequest, to then get RunData, to ultimately get query string parameters or portal attributes (not portlet). This code is everywhere and while it may not be the correct way, we need a simple alternative for our migration from Portal v5 to Portal v6. Thanks for any help.

Jim Barnes

unread,
Jul 20, 2009, 2:30:56 PM7/20/09
to
the best way would be to write a servlet filter to strip the params and dump them to dynacache and then you can get them from anywhere in the jvm

Jim

0 new messages