Hi James,
> I'm using Struts and I noticed a problem with my web application when I
was
> running under Netscape 4.0. I was getting different results than if I ran
> under IE. It turns out that the reason is because my links have spaces in
> the parameter values:
>
> http://foo.com/app/foo.do?parm=I have spaces&parm2=I do to
>
> I'm using the <form:link> tag to generate the links. It seems that this
> code should do some sort of URL encoding on the parameters, or am I just
> doing something wrong? It doesn't seem to me that my property getter
> should worry about URL encoding the property value.
>
Yes, that's a known problem, first reported by Mathias Kerkhoff (struts-dev,
Nov 13, 2000): Struts uses indistinctly Beanutil.filter() that substitute
HTML characters, but not URI or parameters characters.
Solutions have been suggested, using java.net.URLEncoder or an ad-hoc class
(by me, struts-dev, Dec 06, 2000), but I don't think the corrections have
been applied.;-(
So, for the time being, either you encode your URL and parameters yourself
(change the link tag and others), either don't put sensible characters in
the URLs (' ', &, %, #, etc).
Pierre Métras