you shall have to encode the string.
use the package java.net.URLEncoder.
in our project what i am doing is that i have written a class which
Provides a method to encode any string into a URL-safe form, the so-called
"x-www-form-urlencoded" form. Non-ASCII characters are first encoded as
sequences of  two or three bytes, using the UTF-8 algorithm, before being
encoded in "x-www-form-urlencoded".
think this might help

Vikramjit singh,
eAngel Team,
Global Tele-systems Ltd.
Ph. 7612929-3140


-----Original Message-----
From: William Crook [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, October 17, 2001 8:37 AM
To: [EMAIL PROTECTED]
Subject: Escaping special characters in a link...


Is there a utility to escape special characters in a link?
for example:

<%
String value="value, .value";
%>
<a href="http://blah.com/test.jsp?key=<%=value%>">The link</a>


Clicking on the link will cause a server not found dns error because of the
period.
Thanks!


:bill crook

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com

Reply via email to