Getting ServletRequest from PortletRequest - Websphere

This is a discussion on Getting ServletRequest from PortletRequest - Websphere ; 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 ...

+ Reply to Thread
Results 1 to 4 of 4

Thread: Getting ServletRequest from PortletRequest

  1. Getting ServletRequest from PortletRequest

    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

  2. Re: Getting ServletRequest from PortletRequest

    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

  3. Re: Getting ServletRequest from PortletRequest

    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.

  4. Re: Getting ServletRequest from PortletRequest

    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



    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

+ Reply to Thread