You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Daniel Schaller <da...@cameronsystems.com> on 2005/08/07 21:02:43 UTC
Forwarding to a global Forward
Hi,
I have a global forward
<forward name="AddUser" path="/ManageUsersEdit.do?
operation=add"></forward>
In one of my actions, I would like to forward to "AddUser" like:
<action ...>
<forward
name="default"
path="/AddUser"
/>
</action>
rather than using the entire path defintion "/ManageUsersEdit.do?
operation=add".
However, if I do so, I get a 404 error, page or path not found.
Any ideas? Or is it simple not possible to forward to another
(global) forward?
Thanks,
Daniel
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Forwarding to a global Forward
Posted by "Frank W. Zammetti" <fz...@omnytex.com>.
Hi Danial,
Are you getting a 404 because the FORWARD isn't found or because the
PATH isn't found? I notice you have a space between ? and "operation",
and I'd be willing to bet that's what's causing the problem.
Whether it is or not, is there a specific reason you aren't just
returning the AddUser forward from your Action?
Frank
Daniel Schaller wrote:
>
> Hi,
>
> I have a global forward
>
> <forward name="AddUser" path="/ManageUsersEdit.do?
> operation=add"></forward>
>
> In one of my actions, I would like to forward to "AddUser" like:
>
> <action ...>
> <forward
> name="default"
> path="/AddUser"
> />
> </action>
>
> rather than using the entire path defintion "/ManageUsersEdit.do?
> operation=add".
>
> However, if I do so, I get a 404 error, page or path not found.
>
>
> Any ideas? Or is it simple not possible to forward to another (global)
> forward?
>
> Thanks,
>
> Daniel
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
>
>
> .
>
--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Forwarding to a global Forward
Posted by Daniel Schaller <da...@cameronsystems.com>.
Hello Geeta and Frank,
Thanks for you quick responses.
@Frank: The space of the ? was just a type when I was writing the mail.
@Geeta: You're right, I could forward directly from within my Action
class. However, if I am doing so, then I have to hard code the
Forward's name. Of course, I could define constants, however those
would be specific and not according to the common methodology like
using "success", "error" etc. for local forward names. I want to be
flexible and keep the Actions classes as close as possible to the
standard rules. And in case of a need to change the local forwards, I
don't wanna go to the source code and change it there.
So if there would be a way to have this indirection, that would be
great.
Thanks.
Cheers,
Daniel
On 7 Aug 2005, at 20:31, GRamani@intellicare.com wrote:
> Hi Daniel:
>
> Why do you even bother defining the "default" forward for your
> action? Why
> not simply (in your Action class) forward to "AddUser" - the global
> forward that you have defined already?.....Is there something else
> you are
> trying to achieve?
>
> Regards,
> Geeta
>
>
>
>
> Daniel Schaller <da...@cameronsystems.com>
> 08/07/2005 03:02 PM
> Please respond to
> "Struts Users Mailing List" <us...@struts.apache.org>
>
>
> To
> user@struts.apache.org
> cc
>
> Subject
> {Spam?} Forwarding to a global Forward
>
>
>
>
>
>
>
> Hi,
>
> I have a global forward
>
> <forward name="AddUser" path="/ManageUsersEdit.do?
> operation=add"></forward>
>
> In one of my actions, I would like to forward to "AddUser" like:
>
> <action ...>
> <forward
> name="default"
> path="/AddUser"
> />
> </action>
>
> rather than using the entire path defintion "/ManageUsersEdit.do?
> operation=add".
>
> However, if I do so, I get a 404 error, page or path not found.
>
>
> Any ideas? Or is it simple not possible to forward to another
> (global) forward?
>
> Thanks,
>
> Daniel
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
> --
> This message has been scanned for viruses and
> dangerous content by MailScanner, and is
> believed to be clean.
>
>
>
> CONFIDENTIALITY NOTICE:This email is intended solely for the person or
> entity to which it is addressed and may contain confidential and/or
> protected health information. Any duplication, dissemination, action
> taken in reliance upon, or other use of this information by persons or
> entities other than the intended recipient is prohibited and may
> violate
> applicable laws. If this email has been received in error, please
> notify
> the sender and delete the information from your system. The views
> expressed in this email are those of the sender and may not
> necessarily
> represent the views of IntelliCare.
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: {Spam?} Forwarding to a global Forward
Posted by GR...@intellicare.com.
Hi Daniel:
Why do you even bother defining the "default" forward for your action? Why
not simply (in your Action class) forward to "AddUser" - the global
forward that you have defined already?.....Is there something else you are
trying to achieve?
Regards,
Geeta
Daniel Schaller <da...@cameronsystems.com>
08/07/2005 03:02 PM
Please respond to
"Struts Users Mailing List" <us...@struts.apache.org>
To
user@struts.apache.org
cc
Subject
{Spam?} Forwarding to a global Forward
Hi,
I have a global forward
<forward name="AddUser" path="/ManageUsersEdit.do?
operation=add"></forward>
In one of my actions, I would like to forward to "AddUser" like:
<action ...>
<forward
name="default"
path="/AddUser"
/>
</action>
rather than using the entire path defintion "/ManageUsersEdit.do?
operation=add".
However, if I do so, I get a 404 error, page or path not found.
Any ideas? Or is it simple not possible to forward to another
(global) forward?
Thanks,
Daniel
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
CONFIDENTIALITY NOTICE:This email is intended solely for the person or
entity to which it is addressed and may contain confidential and/or
protected health information. Any duplication, dissemination, action
taken in reliance upon, or other use of this information by persons or
entities other than the intended recipient is prohibited and may violate
applicable laws. If this email has been received in error, please notify
the sender and delete the information from your system. The views
expressed in this email are those of the sender and may not necessarily
represent the views of IntelliCare.