tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From André Warnier>
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:
For additional commands, e-mail:

View raw message