Switch to full style
What's behind JSP & Servlets
Post a reply

URLEncoder issues

Wed Oct 22, 2008 1:30 am

I'm just a beginner at Java API webservlets, so I need someone to help
me out, as I understand that URLEncoder.encode is deprecated in the
latest jdk1.4.8 (and higher), I'm not quite sure how to recode the
following statement:

String againLink = URLEncoder.encode(req.getHeader("Referer"));

If anyone can help me out with this would be greatly appreciated! :)



Re: URLEncoder issues

Wed Oct 22, 2008 1:33 am

I think you can use:
URLEncoder.encode(String s, String enc)
s - String to be translated.
enc - The name of a supported character encoding.

For supported character encoding, see
http://java.sun.com/javase/6/docs/api/j ... arset.html

Post a reply
  Related Posts  to : URLEncoder issues
 skymiles Right Sidebar - Issues     -