tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From André Warnier ...@ice-sa.com>
Subject Re: Content-Language en-US
Date Sat, 31 Jan 2009 15:44:25 GMT
Rubens wrote:
> I always see "Content-Language en-US" on the HTTP header response of Tomcat
> 6. 
> 
> I wrote code below to have a different locale and header on the response. 
> However, this does not change the response header.
> 
> response.setLocale(userSession.getLocale());
> ((HttpServletResponse) response).setHeader("Content-Language",
> userSession.getLocale().getLanguage());
> 
> Rubens.
A suggestion : check the logfile.
If you see a message containing "response already committed", it means 
that you are doing the above too late, when Tomcat has already started 
outputting the response (iow has already written out at least one 
header).  It will not let you play with the reponse headers anymore then.



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


Mime
View raw message