Hi,

Perhaps I'm misunderstandig the use of modules: I have a default module that handles basic webapp functionality (homepage forwarding, layout, etc) and other modules handle additional functionality such as user management (log in/out, registration, details modifications, etc) henc the need to forward actions from the default layer to the user login layer.

Is this the correct approach, or should I stick to putting it all into one web application?

Yves Sy wrote:
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]



Reply via email to