You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Amos Shapira <am...@webcollage.com> on 2001/06/07 16:23:52 UTC

setting content type from servlet

Hello,

Out environment:
1. Tomcat 3.2.2
2. Sun JDK 1.2.2_5
3. Windows 2000

We accept requests in Servlets which set the content type then forward the
request to the JSP.

It seems that the JSP overrides the content type as part of its
initialization.

We would like to avoid adding a <%@ page contentType="..."%> to each
JSP page both for maintenability and since we want the content type to
be configurable.

Is there a way to do that?

I read in the jGuru JSP FAQ that an include() instead of a forward() might
cause
header-setting in the JSP to be ignored, is that the right solution?  What
else would
this affect?

Thanks,

--Amos