-
1. Re: Encoding of Request/Reponse
julien1 Jun 4, 2004 9:20 AM (in response to innovate)yes the encoding is a little bit messy.
we should switch it to UTF-8. Nukes always output chars, at the end tomcat does the conversion from java.lang.String to the right encoding.
encoding is given to the browser uwith 2 infos : in the HTTP response headers and in the page with the meta tag. I don't understand really well why there is a need for both of these. -
2. Re: Encoding of Request/Reponse
innovate Jun 8, 2004 9:04 AM (in response to innovate)Hello,
I have investigated some time to discover the whole problem. It seems, that the problem is not nukes, but the integration of tomcat into JBoss.
The encoding is not messy as long as I have seen - you mentioned.
I have simply overwritten the method doGet(..) in the Class NukesServlet with the following content including umlauts.
protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException
{
resp.setContentType("text/html; charset=UTF-8");
Writer out = resp.getWriter();
out
.write("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">");
out.write("");
out.write(" Encoding Servlet");
out.write(" ");
out.write(" <H1>Hallo, - über meinem Haupt ist der Himmel</H1>");
out.write(" ");
out.write("");
out.flush();
out.close();
}
In the WebBrowser I see only question marks instead of the umlauts. You can simply insert this code into Tomcat 4 or 5 and you will see the umlauts.
So, I am right and how can we change that?
Regards,
Cyrill