tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Konstantin Kolinko <knst.koli...@gmail.com>
Subject Re: o Tomcat alter the page encoding for JSP file created via Netbeans 7.01
Date Sun, 06 Nov 2011 00:02:35 GMT
2011/11/5 Kiran Badi <kiran@poonam.org>:
> <%@page contentType="text/html" pageEncoding="UTF-8"%>

The above contentType value does not include charset argument.
Thus the actual content type in HTTP response will be "text/html;
charset=ISO-8859-1",  which does not match with your HTML <meta> tag
below.

> <!DOCTYPE html>
> <html>
> <head>
> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

I'd recommend to use
<meta http-equiv="Content-Type" content="<%=response.getContentType()%>">
so that Content-Type HTTP header and the above <META> tag always have
the same value.

Best regards,
Konstantin Kolinko

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message