That won't work. What you mentioned only works for JSP files, not XML or
HTML files. There has to be a way to specify headers externally from the file itself.
Gili
On Tue, 10 Sep 2002 10:04:38 +0200, Power-Netz \(Schwarz\) wrote:
>> I'd like to send out the following HTTP headers for all *.xml files
>> "Content-Cache=maxage=3600" while for *.jsp it should be
>> "Content-Cache=no-cache".
>>
>> I know how to configure headers per mime type under Apache,
>> but how is this
>> done under Tomcat? *Can* it be done?
>
>simple :
>
> response.setHeader("Cache-Control","no-cache");
>
>You can define any header you want... some headers have theire own
>methodecalls
>like :
>
> response.setContentType(filter.getType());
> response.setHeader("Content-length",String.valueOf(bytes.length));
>
> where getType() is just a normal mime-string
>
>cu
>
>
>--
>To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
>For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>