Get the tools you need to learn Java skills fast!
Video tutorials, eBooks, hands-on lab exercises, sample code.
Get started
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

Win a copy of The Software Craftsman this week in the Agile forum!
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

Have you tried LearnNowOnline?
subject: Deprecated method error