You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Gilbert, Antoine" <AG...@korem.com> on 2003/03/19 21:53:09 UTC

ServletResponse

Hi 
 
I have a simple question about this piece of code in a simple JSP
 
response.setHeader("test","hi");
Logger.log(response.containsHeader("test"));
 
Why the contains method return false ? the response is not commited yet (I verified with isCommited())
 
Another question related to this... (why I'm testting it...)
 
I set the contenttype to utf-8
 
my response in web browser output correctly in utf-8..
 
but when I use a simple tag, and this one doing setLocale(fr_CA) on the response, my browser output become ISO-...
response.getCharacterEncoding() pass from utf-0 to iso-xxxx (no commit yet) after using the tag (the setLocale is in the doStartTag)..
 
I can't modify the tag. And it seem i can't set any header of the response (first problem). How i could get back to correct settings ?
 
I tried to flush the response before using the tag, and it work, i became in utf-8.. but unfortunatly, i cant flush the response before using the tag..
 
I tried to setContentType("text/html; charset=utf-8") without success..
 
regards
 
 

Salutations,

__________________________________________________<?XML:NAMESPACE PREFIX = O /> 

Antoine Gilbert /  <ma...@korem.com> agilbert@korem.com
Analyste-programmeur

KOREM
Technologies de GÉOdiffusion 

__________________________________________________

680, boul. Charest Est, bureau 120
Québec (Québec) G1K 3J4
 <http://www.mapanswer.com/07_localisation/LocalisationDemoNav.jsp?street=charest+est&city=quebec&civicNumber=680&code=&profile=qdm> Localisation KOREM Qc
Tél. : (418) 647-1555
Téléc. : (418) 647-1666
1 888 440-1MAP 

 <http://www.korem.com/> www.korem.com
__________________________________________________

* Partenaire canadien MapInfo de l'année - 2002
* Partenaire canadien MapInfo de l'année - 2001
* Meilleur nouveau partenaire MapInfo 2000-Amérique du Nord

__________________________________________________