You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Sergei Ostavnenko <ky...@hotmail.com> on 2003/04/08 18:24:22 UTC

Different Content Type returned by Tomcat 4.1 and Tomcat 4.0. Please Help!

Hi,
I've noticed an interesting discrepancy between Tomcat 4.1.x and earlier 
Tomcat 4.0.x:  the Response returned by servlets running on Tomcat 4.1.x has 
different default Content Type in the Header, then the one that returned by 
Tomcat 4.0.x.

Example:
A servlet is generating an HTML content (by including a JSP) without 
specifying explicitly the Content Type. In this case v4.1.x (v4.1.18 and 
v4.1.24) would return the content type "text/plain", and v4.0.x (v4.0.1 and 
v4.0.2) didn't do it.

Is it something that was officially changed/corrected when moving from 
HTTP/1.1 connector to Coyote?
Is it a bug that was fixed, or is it a bug that is now?  Is it configurable 
in v4.1.x?

The consequences are that the same application is becoming non-compatible 
with Netscape Navigator - it treats the output as a text and displays the 
Source instead of the Page.  IE is more forgiving, and would work fine as 
soon as it sees the HTML tag in the beginning.
And again exactly the same application was working fine with both browsers, 
Netscape and IE, when was running from older v4.0.x.

I would really appreciate any info on this, since I need to figure out the 
best way how can I address this problem.
Of course, for future releases we can deal with it by specifying the Content 
Type explicitly.  However, we have a bunch of previous versions of the 
application in use, and I need to do something about them, since we moved to 
Tomcat 4.1.x, and the problem appeared.
Adjusting the configuration of Tomcat 4.1.x would be preferable solution, 
however I couldn't find any info on this particular setting.

Any suggestions?
Thank you in advance,

Sergei Ostavnenko


_________________________________________________________________
STOP MORE SPAM with the new MSN 8 and get 2 months FREE*  
http://join.msn.com/?page=features/junkmail


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org