• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Dealing with Timed out sessions...

 
Tad Dicks
Ranch Hand
Posts: 264
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Inside my default layout page I have the following tags:


"user" is an attribute set in the session when a user logs in successfully.
When its not present the user's session is "invalid" or timed out.
the forward works in forwarding the page back to the login screen, but I also want to display a short message explaining that hte session has timed out. How can I do this? the above code isn't passing the info bean.

-Tad
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 35279
384
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tad,
When writing a bean, you need to use the "toScope" attribute instead of "scope." Also, you may need to set it in the session before forwarding.
 
Tad Dicks
Ranch Hand
Posts: 264
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I changed the scope attribute to toScope="session" and it still didn't work.

I'm thinking I can't be the first person to have tried to implement something that works this way. Is there a better approach? I really don't want to go through every single action class and add a new


It would be much nicer if I could just put the code inside the "master layout" tile..

-Tad
 
P.K Gupta
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
<logic forward.....>
takes u to the login page before executing
<bean efine scope="request" id = "info" value="timed out session"/>



So write it like this

<logic:empty name="user">
<bean efine scope="request" id = "info" value="timed out session"/>
<logic:forward name="TimedOut"/>
</logic:empty>
 
Tad Dicks
Ranch Hand
Posts: 264
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks, don't know how I missed that sounds obvious.


-Tad
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic