velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <>
Subject Re: [tools] StrutsLinkTool's setForward method has different behavior
Date Thu, 28 Jul 2011 16:48:47 GMT

On 7/27/2011 10:55 AM, Nathan Bubna wrote:
> [I]t means that after you turn the url into a (which
> does the parsing for you) and you are copying out the sections of the
> URI into the current LinkTool instance, you don't want to override
> things in the currents LinkTool that are absent in the URI.  If the
> URI has no scheme, don't set the LinkTool to have a null scheme, and
> so on.

It looks like StrutsLinkTool.setForward() invokes
generic.LinkTool.absolute() which doesn't modify the path at all, and
doesn't use or Basically, my path
(/foo/bar?foo=bar) gets set as the tool's path directly.

I think the solution is to modify this so that
generic.LinkTool.absolute() /does/ use the URI class to parse the URI
and separate-out the query string, etc. and then set them on the copied
LinkTool's instance.

I'll give it a shot and see if it works out.


View raw message