• Post Reply Bookmark Topic Watch Topic
  • New Topic

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

 
Alexey Pilipchuk
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!