Use java.net.URLEncoder to encode (upon submit), decode (upon receipt) instead.
-----Original Message----- From: A mailing list about Java Server Pages specification and reference [mailto:[EMAIL PROTECTED] Behalf Of Jan Arenö Sent: Wednesday, January 14, 2004 1:04 AM To: [EMAIL PROTECTED] Subject: replace + in URL with %2B Hi I have a problem. I have to send a oracle rowid as a param to a page. The rowid can have a + char as one of 32 characters. As we all know, if we send a + char as a url parameter it ends up as a space (hi+there = hi there) As I send the parameter in a <a href> tag, I have to decode the + as %2B (value for + char). I guess that the response.encodeRedirectURL should do the trick, or? Even if it do encode it as %2B, the webbrowser will take the %2B as a + and the link will still be the same (diffrent sourcecode only). What I have to do is to 1. Encode the + so the webbrowser takes it for %2B 2. Encode it with javascript, when the link is clicked Antone else who had the same problem? Is there a easy solution? //Jan =========================================================================== To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant archives, FAQs and Forums on JSPs can be found at: http://java.sun.com/products/jsp http://archives.java.sun.com/jsp-interest.html http://forums.java.sun.com http://www.jspinsider.com ------------------------------------------------------------------------------ This email is confidential and may be legally privileged. It is intended solely for the addressee. Access to this email by anyone else, unless expressly approved by the sender or an authorized addressee, is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action omitted or taken in reliance on it, is prohibited and may be unlawful. If you believe that you have received this email in error, please contact the sender, delete this e-mail and destroy all copies. ============================================================================== =========================================================================== To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant archives, FAQs and Forums on JSPs can be found at: http://java.sun.com/products/jsp http://archives.java.sun.com/jsp-interest.html http://forums.java.sun.com http://www.jspinsider.com