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 <so...@Solucient.com> on 2003/04/08 16:57:39 UTC

Different Content Type returned by Tomcat 4.1 and Tomcat 4.0. Pl ease 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.

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.

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?

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
Solucient, LLC
sostavnenko@solucient.com



This message is a private communication. It may contain information that is
confidential and legally protected from disclosure. If you are not an
intended recipient, please do not read, copy or use this message or any
attachments, and do not disclose them to others. 

Please notify the sender of the delivery error by replying to this message,
and then delete it and any attachments from your system. Thank you. 
Solucient LLC.