aspose file tools*
The moose likes Struts and the fly likes Dealing with Timed out sessions... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Dealing with Timed out sessions..." Watch "Dealing with Timed out sessions..." New topic
Author

Dealing with Timed out sessions...

Tad Dicks
Ranch Hand

Joined: Nov 16, 2004
Posts: 264
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
internet detective
Marshal

Joined: May 26, 2003
Posts: 30516
    
150

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.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Tad Dicks
Ranch Hand

Joined: Nov 16, 2004
Posts: 264
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

Joined: Jan 05, 2005
Posts: 2
<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

Joined: Nov 16, 2004
Posts: 264
Thanks, don't know how I missed that sounds obvious.


-Tad
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Dealing with Timed out sessions...