tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sergei Ostavnenko" <>
Subject RE: Different Content Type returned by Tomcat 4.1 and Tomcat 4.0. Please Help!
Date Wed, 09 Apr 2003 01:33:19 GMT
Thank you very much for your comment.
The idea with filter sounds like a good option.

Although, I still have a feeling that certain Tomcat configuration options 
should be available in order to make it handle the Content Type in the same 
way as Tomcat 4.0 does.  Any ideas on that?

As to the invoker... I do have the invoker mapping uncommented (I'm not sure 
why it's commented in latest versions though), but for particular 
application that I have problem with, it doesn't even matter: all the 
servlets are mapped in it's own web.xml.
Anyway I did try with the invoker mapping commented and uncommented - same 
problem as far as Content Type in header is concerned.

Thanks a lot,

Sergei Ostavnenko

>From: "Shapira, Yoav" <>
>Reply-To: "Tomcat Users List" <>
>To: "Tomcat Users List" <>
>Subject: RE: Different Content Type returned by Tomcat 4.1 and Tomcat 4.0.  
>Please Help!
>Date: Tue, 8 Apr 2003 12:33:15 -0400
>This may be related to the invoker servlet being disabled.  Do you have
>it enabled, or are you using servlet mappings?
>It is a good practice for servlets to set their content-type explicitly.
>Don't rely on the connector or container to do this for you.  So this
>should be your way going forward.
>One possible solution for your older tomcat 4.0.x applications is to
>implement a filter that sets the response content type.  Map this filter
>as you need, and this way you can set the content type without touching
>your old servlets.  (You will need to deploy the filter, list it in
>web.xml, and restart your webapp of course).
>If you're running with an Apache front-end you can do a similar thing to
>the filter using Apache's header manipulation ability.
>Yoav Shapira
>Millennium ChemInformatics
> >-----Original Message-----
> >From: Sergei Ostavnenko []
> >Sent: Tuesday, April 08, 2003 12:24 PM
> >To:
> >Subject: 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
> >Tomcat 4.0.x:  the Response returned by servlets running on Tomcat
> >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
> >v4.1.24) would return the content type "text/plain", and v4.0.x (v4.0.1
> >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
> >in v4.1.x?
> >
> >The consequences are that the same application is becoming
> >with Netscape Navigator - it treats the output as a text and displays
> >Source instead of the Page.  IE is more forgiving, and would work fine
> >soon as it sees the HTML tag in the beginning.
> >And again exactly the same application was working fine with both
> >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
> >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
> >to
> >Tomcat 4.1.x, and the problem appeared.
> >Adjusting the configuration of Tomcat 4.1.x would be preferable
> >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*
> >
> >
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail:
> >For additional commands, e-mail:
>This e-mail, including any attachments, is a confidential business 
>communication, and may contain information that is confidential, 
>proprietary and/or privileged.  This e-mail is intended only for the 
>individual(s) to whom it is addressed, and may not be saved, copied, 
>printed, disclosed or used by anyone else.  If you are not the(an) intended 
>recipient, please immediately delete this e-mail from your computer system 
>and notify the sender.  Thank you.
>To unsubscribe, e-mail:
>For additional commands, e-mail:

STOP MORE SPAM with the new MSN 8 and get 2 months FREE*

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message