struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steve Raeburn" <>
Subject RE: Multiple modules - Please help
Date Wed, 30 Jul 2003 14:49:58 GMT
It wouldn't be (easily) possible to change ForwardAction to be configurable
between context and module relative because the ActionMapping only has one
parameter which is already being used to provide the path.

A couple of options would be to create a second version of ForwardAction
(ModuleForwardAction ?) that returns a module relative ActionForward, or to
create a simple action that returns an ActionForward which is configured in
struts-config with a well-known name ("success", in my example).

I prefer the latter approach because it is more flexible and uses the
standard method of configuring the ActionForward via struts-config. You'd
have to create your own for now, but I hope to add this as a standard

The action (SuccessAction):
  public ActionForward execute(
    ActionMapping mapping,
    ActionForm form,
    HttpServletRequest request,
    HttpServletResponse response)
      throws Exception {

      return mapping.findForward("success");


  <!-- Module relative mapping -->
  <action path="/showEdit"
    <forward name="success" path="/edit.jsp"/>


  <!-- Context relative mapping -->
  <action path="/showEdit"
    <forward name="success" path="/admin/edit.jsp" contextRelative="true"/>


> -----Original Message-----
> From: Ajay Patil []
> Sent: July 29, 2003 7:11 PM
> To:;
> Subject: RE: Multiple modules - Please help
> Dear Steve,
> Thanks for finding the problem in the configuration file. I had
> not realized it. ** sorry for the typo in bug report **
> So, now I have an enhancement request.. :)
> Would it be possible to enhance ForwardAction so that it also
> requires a MODULE relative path ?
> It would be then very intuitive and convenient.
> Also, splitting into modules will be easier as you simply have to
> chop off the module path globally. Changing module names will be
> even easier.
> If you think the above is ok and it doesnt conflict with the current
> implementation, I shall re-open the bug as an enhancement request.
> Please let me know,
> Thanks a bunch,
> Ajay

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message