David,
      I am doing something similiar in an application I am working on. 
While I am not stripping the slash, I am modifying the path returned by 
an action mapping by adding parameters to it without modifying any 
Struts code.

I recommend this solution (or something similar):  Write an extension of 
ActionForward called SlashlessActionForward.  Make the constructor of 
this object take an Action forward object like this:

     public SlashlessActionForward(ActionForward forward) {

         setName(forward.getName());
         setPath(forward.getPath());
         setRedirect(forward.getRedirect());

     }

now, override the getPath() method to return the path without the slash.
(you would also need to overide setPath() to set a String property in 
your class)

you can now use this in an ActionClass perform method like this:

SlashlessActionForward forward =
        new SlashlessActionForward(mapping.findForward("success"));
return forward;


Bill

[EMAIL PROTECTED] wrote:

-snip-
> As a result, we are considering hacking the Struts code in a couple of
> places to strip the absolute slash off of the front of the action
> reference path name before writing the HTML, and then re-adding it back
> again on the action mapping.  After some investigation, it appears that
> this hack can be isolated to two spots:
> ew taglibs for the rest of time.
-snip-
> Preliminary testing would indicate that this hack does seem to work, but
> I can't help but wonder: are we missing something?  Is there an easier,
> more elegant way to achieve relative paths in action parameter
> references?
> 
> Thanks,
> 
> David McLure
> 
> [EMAIL PROTECTED]
> [EMAIL PROTECTED]

Reply via email to