Take the 2-minute tour ×

How to display right content on jsp page or any configuration need to done in tomcat server...?

display at jsp : Hello G�nter

original content : Hello Günter

We do the following but its not working.

share|improve this question
Have you tried setting the charset to UTF-8? –  Adam Heath Aug 7 '12 at 8:44
Why is your contentType and pageEncoding different? –  Musa Aug 7 '12 at 8:45
Why did you choose a different charset in contentType and pageEncoding? Unless you really know what you are doing, I suggest you use UTF8 everywhere, also the database storage and communications with the database (if you use a database). –  Erwin Moller Aug 7 '12 at 8:46
no i just use jsp page no communication with database –  jayesh Aug 7 '12 at 8:48
What editor do you use? Notepad++ for instance likes to save pages in ANSI mode. –  Amberlamps Aug 7 '12 at 8:50

5 Answers 5

  1. If on Windows, install additional language pack.
  2. Save the JSP file encoded in UTF-8.
  3. Make charset and pageEncoding consistent.
  4. Check your browser's encoding. Set it to UTF-8 as well.
share|improve this answer
not working i do the following <META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=UTF-8"> –  jayesh Aug 7 '12 at 9:01
  • If it is hard-coded HTML use HTML escape sequences.
  • If the value is being picked up from a ResourceBundle, use unicode equivalents.
share|improve this answer

Eclipse defaults to your platform encoding when saving files. If you are on windows, this will most likely not be UTF-8. To change this, either right-click the file (jsp) in eclipse, click properties and at the bottom you can set the encoding it saves the file in.

To change the default content type in Eclipse, you can go to Windows->Preferences and under General / Content Types you can set default encoding to save as for different file types.

share|improve this answer

Your jsp page is OK. So make sure your browser's character encoding is UTF-8.

share|improve this answer

As most other people have said, you should probably check the encoding of the actual file on the file system. Even if the server is instructed to serve out UTF-8, if the file is mangled, you'll get the wrong output.

Among the most common tools, you can use Notepad++ or Eclipse to check the encoding of the file. In Notepad++, open the file and click the Encoding tab. Make sure that "Encode as UTF-8" is selected.

Notepad++ encoding selection

In eclipse, you need to right-click the file in the project explorer. In the Resource tab, the bottom property is "Text file encoding". Make sure that UTF-8 is selected there.

enter image description here

FYI, I had a similar encoding issue a while ago, on Weblogic. The order of the parameters in the attributes affected the way the page behaved. You can find more info here, although I don't think it applies to your problem.

share|improve this answer

Your Answer


