File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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

Deprecated method error

sg hughes

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/ cannot resolve symbol
symbol : method encode (int)
location: class

Note: /usr/local/jakarta-tomcat-4.1.31/work/Standalone/localhost/BooksWeb/ 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

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

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

I agree. Here's the link:
subject: Deprecated method error
jQuery in Action, 3rd edition