tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sean Bridges <>
Subject Re: charset encoding bug
Date Tue, 24 Apr 2007 19:59:04 GMT
Thanks for the reply Rashmi.  

I did a little more digging, and it seems this bug
only appears when the locale is set.  My full servlet
code is,


import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public class ContentType extends HttpServlet {

  protected void doGet(
      HttpServletRequest arg0, 
      HttpServletResponse arg1) 
  throws ServletException, IOException {

In this case the response will be,


This is with a fresh install of tomcat 5.5.23 with no
other webapps or libraries installed.

If I take out the call to setLocale(...) the charset
is not appended to the content type.  

In our webapp, the setLocale(...) method is being
called within Spring's DispatcherServlet.

I think this is a bug, as setLocale(...) should not
modify the content type.



Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 

To start a new topic, e-mail:
To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message