Hi George,

What I usually do in this case is to have a hidden field in my form that
holds the source: <html:hidden property="source" value="somepage.jsp"/>
Then in the perform method I can:
    return new ActionForward( request.getParameter( "source" ) );

There are of course other ways to handle this (make source an attribute of
your ActionForm, use Mapping.getInput() with the source specified in
struts-config.xml), but this works well for me.

Dave D


----- Original Message -----
From: "George Moschovitis" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, March 05, 2002 4:55 AM
Subject: Forwarding to referer


Hi everybody, I am a new user of struts and I have the following question:

at the end of an Action.perform method there is a typical:

            return map.findForward("ok");

that forwards to a web page specified in struts-config.
instead of forwarding to a hardcoded url i want to be able to redirect to
the referrer for this
action. How can this be done ?

any help appreciated !

George Moschovitis

---
Navel Ltd, Greece





--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to