• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

New to Struts - Mappings/Forwards problem

 
beth ana
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am using JSP[Struts] that has a cancel button. But when i click the cancel button I want to go back to the page or action I came from.
I am using the same JSP for two different scenarios, which shows different data. So, the forwards are different based on the scenario. If I explained properly...

Anybody's help is highly appreciated.

[ July 30, 2004: Message edited by: beth ana ]
[ July 30, 2004: Message edited by: Bear Bibeault ]
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65216
95
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moving to the Frameworks forum.
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34973
378
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Beth,
You can use javascript to change the action based on the page.
 
beth ana
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have no idea to do that. Can you please attach a sample code?
 
honey
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
http://www.exadel.com/products_tutorials.htm

more examples that will help u for drop down adding items. The examples were in the above side there were many pdf files which contains detail examples.
 
Surasak Leenapongpanit
Ranch Hand
Posts: 341
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is another solution, using formless buttons.

Define a simple form with no properties:


Struts config file:


JSP page:
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"honey",

Your display name does not comply with our naming policy. Please change it a.s.a.p.

Thank you.
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34973
378
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Beth,
This example shows how to dynamically change the action as I was trying to explain above.

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic