You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Shailender Jain <sh...@teleatlas.com> on 2004/06/11 11:11:04 UTC

session problem

I am using session object in my application to validate whether the user
is valid or not.

I am doing this in the processPreprocess() method of RequestProcessor.
But in I.E. 6.0 update version: SP1, the session object becomes null.
So once user click at any link in the application he gets logged out.

The system admin has also done the following configuration


  1. I installed the application on a machine having the IP
     (10.1.252.41). The system admin made a virtual IP (10.1.252.42) and
     gave me a DSN "dbomis.com" which can be used to access the
     application. This DSN points to virtual IP.
  2. Now when i access the application using http://10.1.252.41/ or
     "http://10.1.252.42/" in IE 6.0 SP1 then it works ok.
  3. When i use the "http://dbomis.com/" then the login page come. User
     is able to login  (processPreprocess() method does not check for
     session while user is logging in). But when the user clicks on any
     link the session becomes null so the user is logged out of the
     application. This problem happens only on I.E. update version SP1.
     On I.E 5.5 this url works ok.

Anyone has got any idea why this must be happening






RE: session problem

Posted by Andrew Hill <an...@gridnode.com>.
The syntax I forget (I dont use JSP for the view myself), so you will need
to look that up, but where you have links in your pages you would use the
<html:rewrite> tag to rewrite the url (or you could use <html:link> to
render the entire link) so that it will include the jsessionid if necessary.
Take a look at the docs for these two tags as theres quite a few other
things they can do for you to. (Like getting the url from a named
actionforward & appending other parameters etc...)

If your working in Java code (such as in an action) take a look at the
HttpServletResponse.encodeURL() method.
[http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/http/HttpServle
tResponse.html]


-----Original Message-----
From: Shailender Jain [mailto:shailender.jain@teleatlas.com]
Sent: Friday, 11 June 2004 17:51
To: Struts Users Mailing List
Subject: Re: session problem


Thanks Andrew for the response.

Should i just put <html:rewrite/> in all my JSP or some attributed also
needs to
be passed.
Where should i put this tag in the JSP.

Andrew Hill wrote:

> The servlet container will try to encode this sessionId in a cookie if it
> can (saving the need to rewrite links) so you may wish to check the
browser
> settings to see if cookies are enabled. (Its best to make sure you use the
> html:rewrite tag (or equivelent) for your links though so that your app
will
> support users when they have cookies disabled).
>
> -----Original Message-----
> From: nikhil walvekar [mailto:walvekarnikhil@yahoo.co.in]
> Sent: Friday, 11 June 2004 17:34
> To: Struts Users Mailing List
> Subject: Re: session problem
>
> Hi,
> same thing i have experienced with IE 6.0, it will work with mozilla
> Problem is that with each request session id is not passed.
> You need to explicitly pass it as url parameter.
> http://dbomis.com/anyLink;jsessionid=A0698B81A1F1AA2B1ECDA19B0ACFD6E2
>
> Nikhil
>
> Shailender Jain <sh...@teleatlas.com> wrote:
> I am using session object in my application to validate whether the user
> is valid or not.
>
> I am doing this in the processPreprocess() method of RequestProcessor.
> But in I.E. 6.0 update version: SP1, the session object becomes null.
> So once user click at any link in the application he gets logged out.
>
> The system admin has also done the following configuration
>
> 1. I installed the application on a machine having the IP
> (10.1.252.41). The system admin made a virtual IP (10.1.252.42) and
> gave me a DSN "dbomis.com" which can be used to access the
> application. This DSN points to virtual IP.
> 2. Now when i access the application using http://10.1.252.41/ or
> "http://10.1.252.42/" in IE 6.0 SP1 then it works ok.
> 3. When i use the "http://dbomis.com/" then the login page come. User
> is able to login (processPreprocess() method does not check for
> session while user is logging in). But when the user clicks on any
> link the session becomes null so the user is logged out of the
> application. This problem happens only on I.E. update version SP1.
> On I.E 5.5 this url works ok.
>
> Anyone has got any idea why this must be happening
>
> Yahoo! India Matrimony: Find your partner online.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: session problem

Posted by Shailender Jain <sh...@teleatlas.com>.
Thanks Andrew for the response.

Should i just put <html:rewrite/> in all my JSP or some attributed also needs to
be passed.
Where should i put this tag in the JSP.

Andrew Hill wrote:

> The servlet container will try to encode this sessionId in a cookie if it
> can (saving the need to rewrite links) so you may wish to check the browser
> settings to see if cookies are enabled. (Its best to make sure you use the
> html:rewrite tag (or equivelent) for your links though so that your app will
> support users when they have cookies disabled).
>
> -----Original Message-----
> From: nikhil walvekar [mailto:walvekarnikhil@yahoo.co.in]
> Sent: Friday, 11 June 2004 17:34
> To: Struts Users Mailing List
> Subject: Re: session problem
>
> Hi,
> same thing i have experienced with IE 6.0, it will work with mozilla
> Problem is that with each request session id is not passed.
> You need to explicitly pass it as url parameter.
> http://dbomis.com/anyLink;jsessionid=A0698B81A1F1AA2B1ECDA19B0ACFD6E2
>
> Nikhil
>
> Shailender Jain <sh...@teleatlas.com> wrote:
> I am using session object in my application to validate whether the user
> is valid or not.
>
> I am doing this in the processPreprocess() method of RequestProcessor.
> But in I.E. 6.0 update version: SP1, the session object becomes null.
> So once user click at any link in the application he gets logged out.
>
> The system admin has also done the following configuration
>
> 1. I installed the application on a machine having the IP
> (10.1.252.41). The system admin made a virtual IP (10.1.252.42) and
> gave me a DSN "dbomis.com" which can be used to access the
> application. This DSN points to virtual IP.
> 2. Now when i access the application using http://10.1.252.41/ or
> "http://10.1.252.42/" in IE 6.0 SP1 then it works ok.
> 3. When i use the "http://dbomis.com/" then the login page come. User
> is able to login (processPreprocess() method does not check for
> session while user is logging in). But when the user clicks on any
> link the session becomes null so the user is logged out of the
> application. This problem happens only on I.E. update version SP1.
> On I.E 5.5 this url works ok.
>
> Anyone has got any idea why this must be happening
>
> Yahoo! India Matrimony: Find your partner online.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: session problem

Posted by Shailender Jain <sh...@teleatlas.com>.
I tried to use

  1. <html:rewrite/>
  2. <html:rewrite forward="DBOMISRequestProcessor"/>

Both are giving errors

For the second option i am getting the error "java.net.MalformedURLException:
Cannot retrive ActionForward named DBOMISRequestProcessor"



Andrew Hill wrote:

> The servlet container will try to encode this sessionId in a cookie if it
> can (saving the need to rewrite links) so you may wish to check the browser
> settings to see if cookies are enabled. (Its best to make sure you use the
> html:rewrite tag (or equivelent) for your links though so that your app will
> support users when they have cookies disabled).
>
> -----Original Message-----
> From: nikhil walvekar [mailto:walvekarnikhil@yahoo.co.in]
> Sent: Friday, 11 June 2004 17:34
> To: Struts Users Mailing List
> Subject: Re: session problem
>
> Hi,
> same thing i have experienced with IE 6.0, it will work with mozilla
> Problem is that with each request session id is not passed.
> You need to explicitly pass it as url parameter.
> http://dbomis.com/anyLink;jsessionid=A0698B81A1F1AA2B1ECDA19B0ACFD6E2
>
> Nikhil
>
> Shailender Jain <sh...@teleatlas.com> wrote:
> I am using session object in my application to validate whether the user
> is valid or not.
>
> I am doing this in the processPreprocess() method of RequestProcessor.
> But in I.E. 6.0 update version: SP1, the session object becomes null.
> So once user click at any link in the application he gets logged out.
>
> The system admin has also done the following configuration
>
> 1. I installed the application on a machine having the IP
> (10.1.252.41). The system admin made a virtual IP (10.1.252.42) and
> gave me a DSN "dbomis.com" which can be used to access the
> application. This DSN points to virtual IP.
> 2. Now when i access the application using http://10.1.252.41/ or
> "http://10.1.252.42/" in IE 6.0 SP1 then it works ok.
> 3. When i use the "http://dbomis.com/" then the login page come. User
> is able to login (processPreprocess() method does not check for
> session while user is logging in). But when the user clicks on any
> link the session becomes null so the user is logged out of the
> application. This problem happens only on I.E. update version SP1.
> On I.E 5.5 this url works ok.
>
> Anyone has got any idea why this must be happening
>
> Yahoo! India Matrimony: Find your partner online.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org

session time out

Posted by Lokanath <lo...@molecularconnections.com>.
hi all ,

can anyone tell me how to reach a page automatically when session expires in
a stusts application

      lokanath

-----Original Message-----
From: andrew.david.hill@gridnode.com
[mailto:andrew.david.hill@gridnode.com]
Sent: Friday, June 11, 2004 3:04 PM
To: Struts Users Mailing List
Subject: RE: session problem


The servlet container will try to encode this sessionId in a cookie if it
can (saving the need to rewrite links) so you may wish to check the browser
settings to see if cookies are enabled. (Its best to make sure you use the
html:rewrite tag (or equivelent) for your links though so that your app will
support users when they have cookies disabled).

-----Original Message-----
>From: nikhil walvekar [mailto:walvekarnikhil@yahoo.co.in]
Sent: Friday, 11 June 2004 17:34
To: Struts Users Mailing List
Subject: Re: session problem


Hi,
same thing i have experienced with IE 6.0, it will work with mozilla
Problem is that with each request session id is not passed.
You need to explicitly pass it as url parameter.
http://dbomis.com/anyLink;jsessionid=A0698B81A1F1AA2B1ECDA19B0ACFD6E2


Nikhil

Shailender Jain <sh...@teleatlas.com> wrote:
I am using session object in my application to validate whether the user
is valid or not.

I am doing this in the processPreprocess() method of RequestProcessor.
But in I.E. 6.0 update version: SP1, the session object becomes null.
So once user click at any link in the application he gets logged out.

The system admin has also done the following configuration


1. I installed the application on a machine having the IP
(10.1.252.41). The system admin made a virtual IP (10.1.252.42) and
gave me a DSN "dbomis.com" which can be used to access the
application. This DSN points to virtual IP.
2. Now when i access the application using http://10.1.252.41/ or
"http://10.1.252.42/" in IE 6.0 SP1 then it works ok.
3. When i use the "http://dbomis.com/" then the login page come. User
is able to login (processPreprocess() method does not check for
session while user is logging in). But when the user clicks on any
link the session becomes null so the user is logged out of the
application. This problem happens only on I.E. update version SP1.
On I.E 5.5 this url works ok.

Anyone has got any idea why this must be happening






Yahoo! India Matrimony: Find your partner online.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org






---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


RE: session problem

Posted by Andrew Hill <an...@gridnode.com>.
The servlet container will try to encode this sessionId in a cookie if it
can (saving the need to rewrite links) so you may wish to check the browser
settings to see if cookies are enabled. (Its best to make sure you use the
html:rewrite tag (or equivelent) for your links though so that your app will
support users when they have cookies disabled).

-----Original Message-----
From: nikhil walvekar [mailto:walvekarnikhil@yahoo.co.in]
Sent: Friday, 11 June 2004 17:34
To: Struts Users Mailing List
Subject: Re: session problem


Hi,
same thing i have experienced with IE 6.0, it will work with mozilla
Problem is that with each request session id is not passed.
You need to explicitly pass it as url parameter.
http://dbomis.com/anyLink;jsessionid=A0698B81A1F1AA2B1ECDA19B0ACFD6E2


Nikhil

Shailender Jain <sh...@teleatlas.com> wrote:
I am using session object in my application to validate whether the user
is valid or not.

I am doing this in the processPreprocess() method of RequestProcessor.
But in I.E. 6.0 update version: SP1, the session object becomes null.
So once user click at any link in the application he gets logged out.

The system admin has also done the following configuration


1. I installed the application on a machine having the IP
(10.1.252.41). The system admin made a virtual IP (10.1.252.42) and
gave me a DSN "dbomis.com" which can be used to access the
application. This DSN points to virtual IP.
2. Now when i access the application using http://10.1.252.41/ or
"http://10.1.252.42/" in IE 6.0 SP1 then it works ok.
3. When i use the "http://dbomis.com/" then the login page come. User
is able to login (processPreprocess() method does not check for
session while user is logging in). But when the user clicks on any
link the session becomes null so the user is logged out of the
application. This problem happens only on I.E. update version SP1.
On I.E 5.5 this url works ok.

Anyone has got any idea why this must be happening






Yahoo! India Matrimony: Find your partner online.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: session problem

Posted by nikhil walvekar <wa...@yahoo.co.in>.
Hi,
same thing i have experienced with IE 6.0, it will work with mozilla
Problem is that with each request session id is not passed.
You need to explicitly pass it as url parameter.
http://dbomis.com/anyLink;jsessionid=A0698B81A1F1AA2B1ECDA19B0ACFD6E2
 
 
Nikhil

Shailender Jain <sh...@teleatlas.com> wrote:
I am using session object in my application to validate whether the user
is valid or not.

I am doing this in the processPreprocess() method of RequestProcessor.
But in I.E. 6.0 update version: SP1, the session object becomes null.
So once user click at any link in the application he gets logged out.

The system admin has also done the following configuration


1. I installed the application on a machine having the IP
(10.1.252.41). The system admin made a virtual IP (10.1.252.42) and
gave me a DSN "dbomis.com" which can be used to access the
application. This DSN points to virtual IP.
2. Now when i access the application using http://10.1.252.41/ or
"http://10.1.252.42/" in IE 6.0 SP1 then it works ok.
3. When i use the "http://dbomis.com/" then the login page come. User
is able to login (processPreprocess() method does not check for
session while user is logging in). But when the user clicks on any
link the session becomes null so the user is logged out of the
application. This problem happens only on I.E. update version SP1.
On I.E 5.5 this url works ok.

Anyone has got any idea why this must be happening






Yahoo! India Matrimony: Find your partner online.