I would guess its because its not really standard practice to submit a
form to a handler from another module. It's kind of a weird flow if
you ask me. Usually you'd submit to a handler in your own module and
THEN forward to wherever else using SwitchAction.

Anyway if the SwitchAction does not work, you can go the usual
javascript way of dynamically changing the action attribute's value...

<% String url = response.encodeURL(request.getContextPath() +
"/another-module/myAction.do"); %>
document.myForm.action = '<%= url%>';
document.myFormsubmit();

Not very elegant but it works.

Regards,
-Yves-

On Thu, 16 Sep 2004 09:30:09 +0100, Ricardo Gladwell
<[EMAIL PROTECTED]> wrote:
> Hi,
> 
> Thanks for that, I will try to use the switch action to forward onto the
> correct module actions. Just out of interest, why doesn't the html:form
> tag have a module attribute?
> 
> Yves Sy wrote:
> > Try using SwitchAction
> >
> > -Regards-
> > Yves
> >
> >
> > On Wed, 15 Sep 2004 23:46:16 +0100, Ricardo Gladwell
> > <[EMAIL PROTECTED]> wrote:
> >
> >>Hi,
> >>
> >>I'm experimenting with struts modules, but I've encountered a problem
> >>whereby I have a struts <html:form> referencing an action in my
> >>non-default module. Instead of referencing the correct action, I get a
> >>"Cannot retrieve mapping for action" JspException.
> >>
> >>How do I reference an action in another module from a html:form? Unlike
> >>html:link there doesn't seem to be a "module" attribute?
> >>
> >>Kind regards...
> >>
> >>--
> >>Ricardo Gladwell
> >>
> >>---------------------------------------------------------------------
> >>To unsubscribe, e-mail: [EMAIL PROTECTED]
> >>For additional commands, e-mail: [EMAIL PROTECTED]
> 
> ---------------------------------------------------------------------
> 
> 
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 



-- 
For me to poop on!
http://www.formetopoopon.com
http://www.nbc.com/nbc/Late_Night_with_Conan_O'Brien/video/triumph.shtml

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

Reply via email to