What I usually do is place the login functionality (and all
common/general functionalities for that matter) in the default
struts-config at the root context.

Now if I have a more specific module or section in my app, i create a
sub-context so that all action mappings for that particular submodule
are on the same subcontext and struts-config file. An example is a
user management module where you CRUD users for your app.

Regards,
-Yves-


On Thu, 16 Sep 2004 10:36:21 +0100, Ricardo Gladwell
<[EMAIL PROTECTED]> wrote:
> 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]
> 
> 



-- 
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