aspose file tools
The moose likes Servlets and the fly likes Quick parameter value question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Elasticsearch in Action this week in the Big Data forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Quick parameter value question" Watch "Quick parameter value question" New topic

Quick parameter value question

James Hodgkiss
Ranch Hand

Joined: Jan 22, 2004
Posts: 401
I have a web form that sends a price String (e.g., "�2.99") to a servlet.

Using request.getParameter() at the servlet gives it as "%A32.99". What's the normal way to convert that back to the original "�2.99"?

arulk pillai
Ranch Hand

Joined: May 31, 2007
Posts: 3322
Why not just pass the value as 2.99 and let internationalization take care of the currency.

[500+ Java Interview Questions and Answers ] | [Java job hunting know how] | [Java resumes]
Andrew Monkhouse
author and jackaroo
Marshal Commander

Joined: Mar 28, 2003
Posts: 11608


Please check your private messages for an important administrative matter.

Thanks, Andrew

The Sun Certified Java Developer Exam with J2SE 5: paper version from Amazon, PDF from Apress, Online reference: Books 24x7 Personal blog
Don't get me started about those stupid light bulbs.
subject: Quick parameter value question