Discussion:
Problem with message and Expired session
Angel Navarro
2006-04-26 17:40:03 UTC
Permalink
Hi,

I have an Struts application.
When user logon, I set the locale's user and all is ok.
But, the expired session, the page that say

Would you like another logon.....

have not the correct language.....

Have anybody any solution?

Thanks
Juergen Kopper
2006-04-26 19:17:28 UTC
Permalink
Hi,
Post by Angel Navarro
When user logon, I set the locale's user and all is ok.
But, the expired session, the page that say
If you use the invalidate() of the HttpSession, it will also remove the
locale. But it's only an assumption, that this is your problem.
Post by Angel Navarro
Would you like another logon.....
have not the correct language.....
Have anybody any solution?
If you used the invalidate() try to use the removeAttribute instead.
Post by Angel Navarro
Thanks
Juergen
Angel Navarro
2006-04-27 10:46:29 UTC
Permalink
Hi,

thanks for your comments.

My problem is the session expired because the system expired session.
I have not invalidate()......do you know?

Thanks
Post by Juergen Kopper
Hi,
Post by Angel Navarro
When user logon, I set the locale's user and all is ok.
But, the expired session, the page that say
If you use the invalidate() of the HttpSession, it will also remove the
locale. But it's only an assumption, that this is your problem.
Post by Angel Navarro
Would you like another logon.....
have not the correct language.....
Have anybody any solution?
If you used the invalidate() try to use the removeAttribute instead.
Post by Angel Navarro
Thanks
Juergen
---------------------------------------------------------------------
Juergen Kopper
2006-04-27 13:51:27 UTC
Permalink
Hi,
Post by Angel Navarro
My problem is the session expired because the system expired session.
I have not invalidate()......do you know?
I don't know. But perhaps you show some code (Action, jsp and
struts-config), to get a better help for this problem.

Juergen
Angel Navarro
2006-04-27 14:31:07 UTC
Permalink
Hi,

when I say 'the system expired session' is that the user are a lot of time
without navigate and explorer expired session,
dou you understand me?

Thanks
Post by Juergen Kopper
Hi,
Post by Angel Navarro
My problem is the session expired because the system expired session.
I have not invalidate()......do you know?
I don't know. But perhaps you show some code (Action, jsp and
struts-config), to get a better help for this problem.
Juergen
---------------------------------------------------------------------
Juergen Kopper
2006-04-27 16:02:21 UTC
Permalink
Hi,
Post by Angel Navarro
Hi,
when I say 'the system expired session' is that the user are a lot of time
without navigate and explorer expired session,
dou you understand me?
Yes I understand it and I think this makes the same as the invalidate(),
this means it unbinds all Objects of a Session also the Locale-Object.

->
http://java.sun.com/j2ee/sdk_1.2.1/techdocs/api/javax/servlet/http/HttpSession.html

An approach for (Struts 1.1) to handle Session problems is:
-use the saveToken() in a login action
-all other actions need to use the isTokenValid() to check if the
session is not expired
Post by Angel Navarro
Thanks
Hope this can help you .

Juergen
Laurie Harper
2006-04-28 21:42:15 UTC
Permalink
Post by Juergen Kopper
Hi,
Post by Angel Navarro
Hi,
when I say 'the system expired session' is that the user are a lot of time
without navigate and explorer expired session,
dou you understand me?
Yes I understand it and I think this makes the same as the invalidate(),
this means it unbinds all Objects of a Session also the Locale-Object.
->
http://java.sun.com/j2ee/sdk_1.2.1/techdocs/api/javax/servlet/http/HttpSession.html
-use the saveToken() in a login action
-all other actions need to use the isTokenValid() to check if the
session is not expired
Post by Angel Navarro
Thanks
Hope this can help you .
Juergen
That's not going to help in this case, since if the session is done you
have no way to check the token anyway. What's needed is a way to
determine the correct locale (language/country) after the session
containing that information has gone away / expired.

The cleanest way to do so is probably to save a cookie with the locale
information. You can then use this cookie to restore the locale
information after the session has expired.

Make sure the cookie has a long enough expiry time (make it a permanent
cookie or tie it to the browser session, perhaps).

HTH,

L.

Loading...