Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Navigating with form actions in Struts

 
Kim Kantola
Ranch Hand
Posts: 276
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
If I have a form action defined in my struts-config.xml as shown below as "/login", I assume that struts performs the login action class, which returns a "success" or a "failure". Is there anyway that I can take that success value and then perform another action? I tried as below but this does not work. Basically, what I want to happen, is if the LoginAction returns success, I want PreMainAction to be executed. Any tips of where I am wrong in my logic?



Thanks, Kim

[ November 15, 2004: Message edited by: Kim Kantola ]
[ November 15, 2004: Message edited by: Kim Kantola ]
 
Ray Stojonic
Ranch Hand
Posts: 326
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You'll need to pretend that you're the browser calling the action and include the servlet-mapping.

ie:<forward name="success" path="/preMain.do"/>
 
Kim Kantola
Ranch Hand
Posts: 276
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you Thank you!
I was going to make a hole in my cube wall from banging my head into it so many times from the frustration!
I just tried this out and it worked exactly as I hoped it would.
I so appreciate your time.
Thanks!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic