• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic