You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by daulat khan <da...@gmail.com> on 2009/11/03 11:41:36 UTC

getRequestedSessionId() returns null

Hi,

I have an java servlet application running in apache-tomcat integration setup.
request.getRequestedSessionId() is always returning null.
Can anyone help to fix this issue ?

I am using
tomcat version : 6.0.20
httpd version : 2.2.14
connector : 1.2.28

Thanks,
Daulatkhan

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: getRequestedSessionId() returns null

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: daulat khan [mailto:daulat.kan@gmail.com]
> Subject: Re: getRequestedSessionId() returns null
> 
> what need to be done in the apache - tomcat setup to send the session
> and cookie with the header ?

The sessionid is sent by the client (browser) - if there is one.  Since your webapp did not create a session on first contact by the client, there's no sessionid for the client to return on subsequent requests.  It's up to your webapp to create the session for non-secured resource requests, not Tomcat or httpd.  You should not assume there will always be a sessionid.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: getRequestedSessionId() returns null

Posted by daulat khan <da...@gmail.com>.
Hi chris,

what need to be done in the apache - tomcat setup to send the session
and cookie with the header ?

Thanks,
Daulatkhan

On Tue, Nov 3, 2009 at 9:57 PM, Christopher Schultz
<ch...@christopherschultz.net> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Daulat,
>
> On 11/3/2009 6:15 AM, daulat khan wrote:
>> GET /earms/earms HTTP/1.1
>> Host: csipl-earms-sol1:8081
>> User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US;
>> rv:1.9.1.4) Gecko/20091016 Firefox/3.5.4
>> Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
>> Accept-Language: en-us,en;q=0.5
>> Accept-Encoding: gzip,deflate
>> Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
>> Keep-Alive: 300
>> Connection: keep-alive
>> Authorization: Basic ZGFzeWVkaWI6
>
> Note: no "Cookie" header was sent, and no ";jsessionid" was in the URL.
> Therefore, no session was requested, and it's appropriate for
> request.getRequestedSessionId to return null.
>
> - -chris
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.10 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iEYEARECAAYFAkrwWfkACgkQ9CaO5/Lv0PANOACeKY/2AxKDD7PgOYBBOlqv2Msl
> /i0An11ZQsBKS8fx1qbJtJC7mGO/kLNp
> =ziTV
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: getRequestedSessionId() returns null

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Daulat,

On 11/3/2009 6:15 AM, daulat khan wrote:
> GET /earms/earms HTTP/1.1
> Host: csipl-earms-sol1:8081
> User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US;
> rv:1.9.1.4) Gecko/20091016 Firefox/3.5.4
> Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
> Accept-Language: en-us,en;q=0.5
> Accept-Encoding: gzip,deflate
> Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
> Keep-Alive: 300
> Connection: keep-alive
> Authorization: Basic ZGFzeWVkaWI6

Note: no "Cookie" header was sent, and no ";jsessionid" was in the URL.
Therefore, no session was requested, and it's appropriate for
request.getRequestedSessionId to return null.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkrwWfkACgkQ9CaO5/Lv0PANOACeKY/2AxKDD7PgOYBBOlqv2Msl
/i0An11ZQsBKS8fx1qbJtJC7mGO/kLNp
=ziTV
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: getRequestedSessionId() returns null

Posted by daulat khan <da...@gmail.com>.
Hi,

The below is the details using Livehttpheaders. can you help me ?

http://csipl-earms-sol1:8081/earms/earms

GET /earms/earms HTTP/1.1
Host: csipl-earms-sol1:8081
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US;
rv:1.9.1.4) Gecko/20091016 Firefox/3.5.4
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
Authorization: Basic ZGFzeWVkaWI6

HTTP/1.x 500 Internal Server Error
Date: Tue, 03 Nov 2009 11:11:36 GMT
Server: Apache/2.2.14 (Unix) mod_jk/1.2.28 DAV/2
Content-Length: 1466
Connection: close
Content-Type: text/html;charset=utf-8

Thanks,
Daulatkhan

On Tue, Nov 3, 2009 at 4:28 PM, Pid <pi...@pidster.com> wrote:
> On 03/11/2009 10:41, daulat khan wrote:
>>
>> Hi,
>>
>> I have an java servlet application running in apache-tomcat integration
>> setup.
>> request.getRequestedSessionId() is always returning null.
>> Can anyone help to fix this issue ?
>
> Can you verify that the client is sending a session id?
> LiveHttpHeaders will assist if it's not immediately visible in the URL.
>
>
> p
>
>
>> I am using
>> tomcat version : 6.0.20
>> httpd version : 2.2.14
>> connector : 1.2.28
>>
>> Thanks,
>> Daulatkhan
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: getRequestedSessionId() returns null

Posted by Pid <pi...@pidster.com>.
On 03/11/2009 10:41, daulat khan wrote:
> Hi,
>
> I have an java servlet application running in apache-tomcat integration setup.
> request.getRequestedSessionId() is always returning null.
> Can anyone help to fix this issue ?

Can you verify that the client is sending a session id?
LiveHttpHeaders will assist if it's not immediately visible in the URL.


p


> I am using
> tomcat version : 6.0.20
> httpd version : 2.2.14
> connector : 1.2.28
>
> Thanks,
> Daulatkhan
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org