struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Waddell <David.Wadd...@citria.com>
Subject RE: Forwarding to the callee page
Date Mon, 19 Feb 2001 18:50:24 GMT
your best approach is to use a field in the calling form with the url of the
page,
you can get this from javax.servlet.http.HttpUtils ...

 HttpUtils.getRequestURL((HttpServletRequest)pageContext.getRequest())

e.g. <input type="hidden" name="returnTo" value="<%=
HttpUtils.getRequestURL((HttpServletRequest)pageContext.getRequest()) %>" >

.. perhaps write a custom tag to render this might be useful..

your action class must then extract this from the request and construct a
new forward from it.

Alternative is to use the referrer property in the http request, but this is
only reliable where the user
has clicked directly on a link, ie. if they are using a bookmark or typing
in the url directly then your code will break..

-----Original Message-----
From: Kishore Subramanian [mailto:kishore.subramanian@agilesoft.com]
Sent: 08 February 2001 00:24
To: 'struts-user@jakarta.apache.org'
Subject: Forwarding to the callee page



Hi,

Is there a way for an Action class to find out which page/action called it ?
Iam faced with a problem where the Action class should perform its work and
forward the page back to callee page.

Note - I cannot add any "forward" tags to this Action mapping because this
Action is part of a framework.

Any clues ?

Thanks,
Kishore

=================
Kishore Subramanian
Agile Software
Off : 408 999 7128
http://www.agilesoft.com
=================
__________________________________________________________________

If you are not the addressee of this confidential e-mail and any 
attachments, please delete it and inform the sender; unauthorised 
redistribution or publication is prohibited. 
Views expressed are those of the author and do not necessarily 
represent those of Citria Limited.
__________________________________________________________________

Mime
View raw message