This week's book giveaway is in the Cloud/Virtualizaton forum.
We're giving away four copies of Mesos in Action and have Roger Ignazio on-line!
See this thread for details.
Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Redirects in Inceptor

 
shaf maff
Ranch Hand
Posts: 180
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Guys

I am working on an interceptor which is going to check for a session on password protected pages. I have setup an if statement which checks for the session. My question is how do I redirect back to the login page in the interceptor class ?

struts.xml:


CheckLogin.java:


I tried to add something like <result name="test" type="redirect">/main/user/manager.jsp</result> into the struts file and then do a return "test"; but that wouldnt work.


.
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
One way would be to have a global result that redirects to the logon action.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic