portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Laura lega" <spanishiso...@libero.it>
Subject WebPagePortlet and cookies
Date Tue, 06 Nov 2001 08:42:54 GMT
Hi everybody!
I need to extend WebPagePortlet in order to deal with cookies.

I understand the portlet that retrieves a HTML page should receive cookies sent by the browser
and deliver them to the server so that the server can recognize the client.

I believe the way is:
1) the portlet gets the cookies from the browser by calling the getCookies method on the Request
object. 
Here I have the first problem: how do I retrieve the Request object? I saw I can get it from
the RunData object by  writing: 
    runData.getRequest( )
....but where do I get the RunData object corresponding to my portlet?

2) the portlet sends the cookies to the server while retrieving the web page by calling:

        HttpURLConnection  pageConn = (HttpURLConnection) pageUrl.openConnection();
        pageConn.setRequestProperty("Cookie", cookie);
        InputStream    is = pageConn.getInputStream();

Thanks in advance,
    Laura


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message