Hi Graham:

        Java has what you need as part of the standard API:

        String EncodedStr = java.lang.URLEncoder.encode(PlainStr);

Cheers,

Greg Trasuk, President
StratusCom Manufacturing Systems Inc. - We use information technology to
solve business problems on your plant floor.
http://stratuscom.ca

> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of Graham Leggett
> Sent: Monday, November 12, 2001 6:47 AM
> To: Tomcat User
> Subject: escape a URL within a sevlet - how?
>
>
> Hi all,
>
> I am trying to generate a set of name/value pairs that will be tacked
> onto the end of a generated URL like this:
>
> url.html?name1=value1&name2=value2
>
> These name value pairs have to be escaped first (problem characters
> converted to %HH) before they are added to the URL - I am
> looking for an
> object within either the servlet or jsp classes that will do
> this for me
> (I cannot find such an object in the docs, although I might be looking
> through it).
>
> Can anyone point out an object I can use?
>
> Regards,
> Graham
> --
> -----------------------------------------
> [EMAIL PROTECTED]              "There's a moon
>                                       over Bourbon Street
>                                               tonight..."


--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>

Reply via email to