This week's book giveaway is in the Cloud/Virtualizaton forum.
We're giving away four copies of Mesos in Action and have Roger Ignazio on-line!
See this thread for details.
Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Deprecated method error

 
sg hughes
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Found a solution. Formatted the url as a string and compiled ok.
 
Amarender Reddy
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic