Multilingual JSP page

We have a JSP page that contains both, English and Greek characters. Some of the data in the page are static Greek/English characters and some are retrieved from a (Greek)database.

To show the Greek data from database, we are using

<% response.setContentType("text/html; charset=Cp1253"); %>

This works fine in showing the Greek data from the database. But, if the above statement is included, the static html greek data in the browser looks like ?

If we remove the response.setContentTpe(...) statement, the Html static data looks perfect and greek data from database looks like ?

Any Thoughts on how to show static/dynamic data in English/Greek languagues, within a jsp page in a browser.

Thank You.

[781 byte] By [murthy2k] at [2007-9-26 7:27:45]
# 1

In your jsp use

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-7">

and for displaying a retrieved field (for example firstName) use

try {

return new String(firstName.getBytes("iso-8859-7"), "windows-1252");

} catch(Exception ex) {

return null;

}

dueller at 2007-7-1 17:22:56 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...