• 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

Struts2 : Forwarding to the requested page after login

 
Ranch Hand
Posts: 99
Mac Eclipse IDE
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,

I am new in Struts2 and creating a project using it.

I have created a login interceptor and its working fine when I forward to the specified action written in stuts.xml. But what I want is, after a successful login I will redirect the user where he wanted to go. e.g. if a user clicks on 'sell' he will be forced to log in and after login the 'sell' page should be shown. If he clicks on 'buy' the 'buy' page should be shown after login. Is there an elegant way to do this?

One thing I can do is, forward to a common JSP and fetch the requested URL saved in session or request then redirect to the requested page. But is there any other way?
 
reply
    Bookmark Topic Watch Topic
  • New Topic