WebSphere HTTP Server - JSESSIONID cookie - Help!

This is Interesting: Free IT Magazines  
Home > Archive > WebSphere HTTP Server > July 2004 > JSESSIONID cookie - Help!





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author JSESSIONID cookie - Help!
Nau

2004-07-15, 5:17 am

Hi, All

I have a need to call a servlet from another one withing the same session:

URL url = new URL( someURL );
URLConnection connection = url.openConnection();
connection.setDoInput( true );
connection.setRequestProperty( "Cookie", "JSESSIONID=" + request.getSession().getId() );

This piece of code works fine for Tomcat but on Webspere I'm getting a new session.

Any help please!
Thanks a million

Nau
Todd Kaplinger

2004-07-15, 6:00 pm

What is the reason for doing a URL connection instead of an internal
dispatch (for example RequestDispatcher.include() )?

Nau wrote:
> Hi, All
>
> I have a need to call a servlet from another one withing the same
> session:
>
> URL url = new URL( someURL );
> URLConnection connection = url.openConnection();
> connection.setDoInput( true );
> connection.setRequestProperty( "Cookie", "JSESSIONID=" +
> request.getSession().getId() );
>
> This piece of code works fine for Tomcat but on Webspere I'm getting a
> new session.
>
> Any help please!
> Thanks a million
>
> Nau
>
>
>
> --
> Nau
> ------------------------------------------------------------------------
> Posted via http://www.webservertalk.com
> ------------------------------------------------------------------------
> View this thread: http://www.webservertalk.com/message308924.html
>


Ben_

2004-07-15, 6:00 pm

Please avoid multi-posting. Also, 'http-servers' newsgroup is not very well
suited for this question.


Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com