Hi, I'm trying to embed a maverick example (friendbook-jsp) as a "portlet" (I basically open an http connection from my application, including jsessionid and other cookies, read everything from the stream and write the obtained string to the response of my servlet). This simple mechanism works with every jsp and servlet I tried, and, since I include the jsessionid cookie, I obtain session synchronization between my "host" app and the "portlets".
Now, with maverick the session gets renewed at each request. I also tried to put the sessionid in the url, but it doesn't work.I also tried to inspect maverick code for an intentional session.invalidate() or something like this, but nothing.
 
I include the piece of code that gets the page content. Any clue?
....
   URLConnection conn = url.openConnection();
      if (request != null) {
        // put together all cookies
        StringBuffer cookie = new StringBuffer("JSESSIONID=");
        cookie.append(request.getSession().getId());
        cookie.append("; ");
        conn.setRequestProperty("Cookie", cookie.toString());
      }
      BufferedReader in = new BufferedReader(
          new InputStreamReader(
          conn.getInputStream()));
      String inputLine;
 
      while ( (inputLine = in.readLine()) != null) {
        buf.append(inputLine);
      }
      in.close();
...

----
Email.it, the professional e-mail, gratis per te: clicca qui

Sponsor:
Sei un webmaster, vuoi guadagnare? Affiliati ad Artefiori. Clicca qui!
Clicca qui

Reply via email to