• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Navigating with form actions in Struts

 
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 ]
 
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!
 
    Bookmark Topic Watch Topic
  • New Topic