• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Strauts Application configuring front controller action

 
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

In our application we are facing problem when user's session times out / user logs out and then try to access any random action. What i mean to say is, we have a start action which finds out user role and access level. but if the application is directly accessed without calling start action then we obviously get errors.

What is the way of forcefully calling the start action even though user accidently tried to access any other action.
(this may happen when someone bookmarks any action instead of actual application URL)

Thanks.
 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Save the requested action, redirect them to the login page, and send them back to the saved action.
 
Chhaya Patil
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The user is sent to log in page if sesion timed out. But what happens is directly the last action (action in URL) is accessed. Since i have lost valuable information from sesion, error occurs.

This can be avoided if whatever is URL, after logged in the Start action is called and Homepage is diaplyed, it's acceptable.

I can do a quick check in every action, if session variabes are null then to redirect to start but i am looking for a better solution.

Thanks.
 
David Newton
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If your application requires recovering from a lost session at *any* point in workflow then you'd need to consider persisting session data in a database and restoring it on login.

Checking for a valid session data can be done in either an action superclass that all your other actions extend or in a custom request processor (S1.2) or whatever the equivalent is in S1.3.

If neither of those two options seems like what you're asking about then you'll have to be a bit more specific.
reply
    Bookmark Topic Watch Topic
  • New Topic