wood burning stoves*
The moose likes Java in General and the fly likes URLEncoder Deprecation Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "URLEncoder Deprecation" Watch "URLEncoder Deprecation" New topic

URLEncoder Deprecation

henri henri
Ranch Hand

Joined: Oct 03, 2005
Posts: 115
My method appends a String to the end of a URL via the encode() method to enable someone to search the Internet.
Compiling 1 source file to C:\Documents and Settings\Serge\film_titles\build\classes
C:\Documents and Settings\Serge\film_titles\src\film_titles\SE800i.java:280: warning: [deprecation] encode(java.lang.String) in java.net.URLEncoder has been deprecated
url += URLEncoder.encode(keyword);
1 warning

Is there an equivalent new method to do the same job?

Ernest Friedman-Hill
author and iconoclast

Joined: Jul 08, 2003
Posts: 24183

Did you go and read the Javadoc for this class?

[Jess in Action][AskingGoodQuestions]
jQuery in Action, 2nd edition
subject: URLEncoder Deprecation
Similar Threads
URLEncoder class ?
how to extract search engine results
Simulating Post in Java code.....