Two Laptop Bag*
The moose likes Servlets and the fly likes Deprecated method error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Deprecated method error" Watch "Deprecated method error" New topic
Author

Deprecated method error

sg hughes
Greenhorn

Joined: Jul 16, 2005
Posts: 2
I am using a method URLEncoder.encode to pass a URL to a "shopping cart". Tomcat 4.1.31 gacks on the compile and displays the following message.

usr/local/jakarta-tomcat-4.1.31/work/Standalone/localhost/BooksWeb/Catalog_jsp.java:128: cannot resolve symbol
symbol : method encode (int)
location: class java.net.URLEncoder

Note: /usr/local/jakarta-tomcat-4.1.31/work/Standalone/localhost/BooksWeb/Catalog_jsp.java uses or overrides a deprecated API.
Note: Recompile with -deprecation for details.

Can anyone point me to where I might find a method that has replaced URLEncoder.encode()?

Thanks, Steve
sg hughes
Greenhorn

Joined: Jul 16, 2005
Posts: 2
Found a solution. Formatted the url as a string and compiled ok.
Amarender Reddy
Ranch Hand

Joined: May 12, 2005
Posts: 54
hey,

thank you for your patience to post the reply as soon as u found it!

it has been a habit here that poeple ask questions but do not post answers

if they find it by any means!!

hope u inspire them

cheers
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Deprecated method error