|
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!
|
|
|
| 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
>
| |
|
| Please avoid multi-posting. Also, 'http-servers' newsgroup is not very well
suited for this question.
|
|
|
|
|