You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by bu...@apache.org on 2003/01/16 18:04:27 UTC
DO NOT REPLY [Bug 16173] New: -
Unable to Redirect within framework - Add RedirectAction?
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16173>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16173
Unable to Redirect within framework - Add RedirectAction?
Summary: Unable to Redirect within framework - Add
RedirectAction?
Product: Struts
Version: 1.1 Beta 2
Platform: All
OS/Version: All
Status: NEW
Severity: Enhancement
Priority: Other
Component: Standard Actions
AssignedTo: struts-dev@jakarta.apache.org
ReportedBy: parsetdx@hotmail.com
I am attempting to send a redirect using the Struts v1.1b2 library. I
attempted using the "redirect" and "contextRelative" attributes of the
<forward> element within an action. These did not work. I noticed that in the
source code for the build, the context path is ALWAYS being appended, even when
the redirect attribute is set to true, and even when I specify a fully
qualified URL. I tried redirecting to "/marvel/test.html" which is a separate
web application sharing the webserver. Then I tried "http://www.yahoo.com".
Neither seemed to work.
What I really wanted was an action which would be analagous to the
ForwardAction, but sends a redirect instead of a forward. Such an action does
not exist. So, I took the ForwardAction, copied it, and changed it to send a
redirect instead of a forward. Now it works just the way I wanted it to. See
the tag below.
<action path="/marvelJump"
type="xxx.share.web.RedirectAction"
parameter="/marvel/f?p=106:1">
</action>
I suggest including this RedirectAction in the next Struts release. Let me
provide the business case. We have multiple applications running on multiple
application servers, but sharing one web server. These applications perform
different tasks, but we need to link between them to provide users access to
the full set of functionality. We use ACL security to ensure only authorized
users can even enter the other applications. This means I must wrap any simple
links with a web resource (aka an action) to enforce this security. The
RedirectAction above is perfect for doing this.
Please feel free to contact me for further information. Thanks for your time,
and thanks for all of your hard work on the Struts framework.
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>