aspose file tools*
The moose likes JSP and the fly likes @page contentType= Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "@page contentType="text/html; charset=UTF-8" ...  seems not working" Watch "@page contentType="text/html; charset=UTF-8" ...  seems not working" New topic
Author

@page contentType="text/html; charset=UTF-8" ... seems not working

Alexey Pilipchuk
Greenhorn

Joined: Jan 30, 2006
Posts: 9
Hi all
I experienced problem with page ecoding- some characters weren't rendered properly.
All my JSP had

<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>

directive set but it didn't help. The only solution I have found it to set http header manualy like that:

<% response.setHeader("Content-Type", "text/html; charset=utf-8"); %>

So the question is why <%@ page contentType=...%> does not affect http headers? And if it does not intent to what is it for?

App server - tomcat 5.5.17

Tnaks in advance
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: @page contentType="text/html; charset=UTF-8" ... seems not working