wood burning stoves 2.0*
The moose likes JSP and the fly likes Currency symbol in jsp Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "Currency symbol in jsp" Watch "Currency symbol in jsp" New topic
Author

Currency symbol in jsp

sumit sharmast
Greenhorn

Joined: Jul 29, 2012
Posts: 15
Dear All,


When I run the below code, it is showing the currency symbol € with amount. But when I am calling this code in jsp it is not showing the currency symbol. Instead of currency symbol, it is showing ? symbol after the price


Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 9947
    
160

Read through this chapter (especially the Page encoding and response encoding sections) http://docs.oracle.com/javaee/1.4/tutorial/doc/WebI18N5.html to understand how the character encoding plays a role in the JSP output.

[My Blog] [JavaRanch Journal]
caleb momanyi
Ranch Hand

Joined: Jun 17, 2012
Posts: 43

you can generate a lot of symbols by using eg to generate € to gerate check mark(✓) etc ✗ etc i don't know what it's called but on my jsp page using netbeans i just press & plus code completion (Ctrl + spacebar) then choose the symbol i want.
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 9947
    
160

caleb momanyi wrote: i don't know what it's called but on my jsp page using netbeans i just press & plus code completion (Ctrl + spacebar) then choose the symbol i want.


This isn't directed at you, but this is exactly the reason why I usually recommend beginners not to use an IDE for anything other than editing. In fact, that's exactly what I use my IDE for. IDEs provide a lot of features which are good if you understand the real details of the technologies you are using. Otherwise you'll just rely on the IDE magic without understanding the underlying technology of your application.
caleb momanyi
Ranch Hand

Joined: Jun 17, 2012
Posts: 43

This isn't directed at you, but
this is exactly the reason why
I usually recommend
beginners not to use an IDE
for anything other than
editing.


I have been hearing that quite a lot. my only question is what level is a person considered to be a beginner? and when do I stop considering myself as such. could you please clarify that. I stopped writting code in JEdit as soon as I had compiled and run my first couple of hello world like programs. did I stop too soon? what is your recommendation for the best time to start using the ide?
sumit sharmast
Greenhorn

Joined: Jul 29, 2012
Posts: 15
I added these 6 lines of code in web.xml and currency problem is solved now




I write this code here because I feel that giving a solution is better than suggesting a weblink to a problem.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Currency symbol in jsp
 
Similar Threads
Country to Currency Mapping
Santis Self Tester
Question related to java.util.Currency's getSymbol method.
$ symbol not displayed properly in excel