File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
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: 3371
Why not just pass the value as 2.99 and let internationalization take care of the currency.

[] | [Java job hunting know how] | [Java resumes]
Andrew Monkhouse
author and jackaroo
Marshal Commander

Joined: Mar 28, 2003
Posts: 11778


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
I agree. Here's the link:
subject: Quick parameter value question
jQuery in Action, 3rd edition