You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Andreas Schlegel <sc...@software.b.uunet.de> on 2001/04/23 20:39:56 UTC
Encoding URL fails
Hi,
I have a problem encoding a string containing the character '&' and put
it as param in an URL
If I encode A&P the URLEncoder.encode(value) returns A%26P. But if I put
this result string as parameter in an URL, the URL contains A&P. So what
can I do to have the encoded value in the URL?
I am a little bit confused because if I do the same using a string
containing the character '?' everything is fine!
Greetings,
Andreas
Re: Encoding URL fails
Posted by Andreas Schlegel <sc...@software.b.uunet.de>.
Thanks for help. It is running now :-)
Greetings,
Andreas
Wolle wrote:
> hello,
> you could make a workaround.
> simple useurl = encodeURL("url") + "¶meter=bla";
>
> Greetings,
> WOlle
>
> Andreas Schlegel wrote:
>
> > Hi,
> >
> > I have a problem encoding a string containing the character '&' and put
> > it as param in an URL
> >
> > If I encode A&P the URLEncoder.encode(value) returns A%26P. But if I put
> > this result string as parameter in an URL, the URL contains A&P. So what
> > can I do to have the encoded value in the URL?
> >
> > I am a little bit confused because if I do the same using a string
> > containing the character '?' everything is fine!
> >
> > Greetings,
> > Andreas
Re: Encoding URL fails
Posted by Wolle <wo...@dorf.RWTH-Aachen.DE>.
hello,
you could make a workaround.
simple useurl = encodeURL("url") + "¶meter=bla";
Greetings,
WOlle
Andreas Schlegel wrote:
> Hi,
>
> I have a problem encoding a string containing the character '&' and put
> it as param in an URL
>
> If I encode A&P the URLEncoder.encode(value) returns A%26P. But if I put
> this result string as parameter in an URL, the URL contains A&P. So what
> can I do to have the encoded value in the URL?
>
> I am a little bit confused because if I do the same using a string
> containing the character '?' everything is fine!
>
> Greetings,
> Andreas