Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
  • 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

Navigating with form actions in Struts

 
Ranch Hand
Posts: 276
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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!
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic