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:JSP-INTEREST@(protected)
Sent: Wednesday, January 14, 2004 1:04 AM
To: JSP-INTEREST@(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 listserv@(protected)
JSP-INTEREST".
For digest: mailto listserv@(protected)
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 listserv@(protected)".
For digest: mailto listserv@(protected)".
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