I want to serve a jsf-page in UTF-8 and so I changed the encoding to UTF-8:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Numberguess</title>
</head>
<body>
<h1>Ä, Ö, Ü</h1>
</body>
But the server does not serve this page in UTF-8: The browser does not show Ä, Ö, Ü correctly.
When I change UTF-8 to ISO-8859-1, then it works: Ä, Ö, Ü is shown correctly:
<?xml version="1.0" encoding="ISO-8859-1"?>
Why is that so? Should I change the encoding elsewhere in the server-config (standalone.xml) ?
When bypassing JSF and serve a static example2.html-file within my war, then the utf-8-characters are also not shown correctly in a browser:
<!doctype html>
<html>
<head>
<meta charset="UTF-8" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<h1>Ä, Ö, Ü</h1>
</body>
The strange thing is, when using httpd to transport the example2.html,then UTF-8 works. So I guess, I have to adjust the encoding anywhere in jboss as 7, but where? Or should I use always use ISO-8859-1 instead of UTF-8 in jboss?