You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by "Whitelaw, Casey" <ca...@auslabs.avaya.com> on 2001/01/21 23:10:37 UTC

setting Content-Type dynamically

Hi,

I have two questions regarding the way Tomcat / Jasper sets the Content-Type
in the HTTP headers of JSPs:

- First, the default charset is "8859_1". Shouldn't this be "ISO-8859-1"?

- Second, how can the content type of a JSP be set dynamically? Jasper
checks for an appropriate @page directive in the JSP, but if there is none
is sets it to "charset=8859_1"; it doesn't check if the ServletResponse
object has already had its content type set (via a setContentType call
earlier). Is this to spec? If not, can Jasper do a quick check on the
ServletResponse to see if the content type has been checked?

Cheers,

Casey Whitelaw
caseyw@auslabs.avaya.com