hi
Shunhui
well
this is a good problem.
I
think this is how you should be able to do it:
in the
action class of EditContactAction/SaveContactAction, get the ActionMapping
instance.(using "getMappings()")
now
for the mapping call the "setForward(string inputForm) " .
Now set the "inputform" , to the input form
which will vary in your case, but You can get this by calling another
function "getInput()" . This funciton will return the input
mapping.
I
think this should work though I haven't tried it.
lemee
know, if you can, in either case.
thanks
Aashish.
-----Original Message-----
From: du Clos, John [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 22, 2001 5:00 PM
To: '[EMAIL PROTECTED]'
Subject: RE: Referer pages and structsShunhui-- i'm new to struts as well, but---maybe you can set a request parameter or attribute that is set by the calling .jsp. Once your contact.jsp if finished, it can redirect back to the page = to the value set by the calling .jsp. I'm not sure if this breaks the struts framework of not going through the programmatic ActionForward.-----Original Message-----
From: Shunhui Zhu [mailto:[EMAIL PROTECTED]]
Sent: Monday, May 21, 2001 7:21 PM
To: [EMAIL PROTECTED]
Subject: Referer pages and structsHi, I'm wondering whether Structs can be used to solve the following problem elegantly.
I have a page, say contact.jsp that has two standard actions associated to it: EditContactAction, SaveContactAction.
This page can be linked from many other pages. What I'd like is to go back to the page that called contact.jsp.
For example, if page1 has a link to contact.jsp, after the user clicked the link, then press the save button on the
contact.jsp, I'd like the next page to be page1. Similarly for all other pages linking to contact.jsp. Is there a way to codecontact.jsp to automatically have this behavior?
Thanks.
Shunhui

