tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From André Warnier ...@ice-sa.com>
Subject Tomcat/servlet question
Date Fri, 12 Sep 2008 21:06:11 GMT
Hi.

In response to a request, a servlet opens and reads a file from disk, 
and sends the content out to the browser (ultimately), "as is".
The content of the file is an html document, saved as a text under some 
encoding, correctly encoded under that encoding, and containing an html 
<meta http-equiv="Content-type: text/html; charset=xxxx >
where the specified encoding is correct and matches the document's.

The "in" stream (the disk file) is opened "raw", and the same for the 
"out" stream.

Question :
who is responsible for setting the HTTP response headers ?
Does the servlet have to set them explicitly ? or does Tomcat do that 
itself if the servlet doesn't ? (*)
(I am specifically interested in headers like "Content-type" and 
"Content-length").

(*) and if Tomcat does, how does it know what to put there ?


Thanks in advance,
André


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


Mime
View raw message