Hi,
I am trying to display XHTML content in a JSP page. The encoding is UTF8. The jsp page calls a method in a java class and the method returns the xhtml content. Basically this is what I have in my jsp page
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN" "http://www.w3.org/Math/DTD/mathml2/xhtml-math11-f.dtd">
<% response.setContentType("application/xhtml+xml"); %>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="content-type" content="text/html;charset=UTF-8" />
</head>
<body>
<% response.setContentType("application/xhtml+xml"); %>
<%=myJavaClass.getXHTML()%>
</body>
</html>
The problem is that some characters show up as QuestionMarks (?). However, if the java class (myJavaClass) writes the same content to a file, all characters are displayed correctly when I open up the file and view it in a text editor. Tomcat's console also shows the xhtml content with all correct characters, only in the browser I am seeing question marks.
Can anyone think of any reason why this is happening?