Re: Retrieving HTTP Servlet Info

Woonsan Ko <[email protected]> Fri, 27 Apr 2012 02:45:43 -0700 (PDT)
Newsgroups gmane.comp.jakarta.jetspeed.user
Message-ID <[email protected]>
Hi Ron,

You can retrieve HTTP headers through PortletRequest#getProperties() and #getProperty(name), but you cannot retrieve portal servlet request parameters with those APIs.
You may retrieve and carefully use portal servlet request, portal servlet response and portal servlet config directly through org.apache.jetspeed.request.RequestContext#getRequest(), #getResponse(), and #getConfig().
RequestContext object can be retrieved as follows:

RequestContext rc = (RequestContext) portletRequest.getAttribute(RequestContext.REQUEST_PORTALENV);

Regards,

Woonsan



>________________________________
> From: Ron McNulty <[email protected]>
>To: Jetspeed Users List <[email protected]> 
>Sent: Friday, April 27, 2012 3:42 PM
>Subject: Retrieving HTTP Servlet Info
> 
>Hi All
>
>I have a legacy application that runs on IBM Websphere Portal that I need to now run on Jetspeed. It uses the Apache Portlet Bridge, plus an IBM specific class to get the ServletContext, HTTPRequest and HTTPResponse from the portlet related structures. I need to replace this class with a Jetspeed version.
>
>Yes, I know JSR286 prohibits this, but I need to do the minimum work to get this running (We develop on Jetspeed and deploy to IBM for production).
>
>I seem to remember that the HTTP parameters may be available from a properties structure, but can't find the reference.
>
>Can anyone help me out?
>
>Regards
>
>Ron
>
>Wellington, NZ
>
>