take a look at the class java.net.URLEncoder and java.net.URLDecoder.



-----Original Message-----
From: Scott Smith [mailto:[EMAIL PROTECTED]]
Sent: Friday, May 25, 2001 1:53 PM
To: JRun-Talk
Subject: coverting whitespace in URL to '%20'


This may be a stupid question, and I can't believe I haven't run across it 
before but...

Is there a method in the Servlet/JSP API that will convert all characters 
which are illegal in URLs to their legal counterpart?

For example mypage.jsp?name=FirstName LastName  becomes
mypage.jsp?name=FirstName%20LastName

???

I assume there must be some method that accepts a String (that is to be 
formatted) and returns the formatted String but I surely can't find it.

Thanks!

Scott
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to