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/09 03:33:19 UTC

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

Yoav,
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" <Yo...@mpi.com>
>Reply-To: "Tomcat Users List" <to...@jakarta.apache.org>
>To: "Tomcat Users List" <to...@jakarta.apache.org>
>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
>
>
>Howdy,
>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 [mailto:kyiv@hotmail.com]
> >Sent: Tuesday, April 08, 2003 12:24 PM
> >To: tomcat-user@jakarta.apache.org
> >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
>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
>
>
>
>
>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: tomcat-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>


_________________________________________________________________
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


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

Posted by Tim Funk <fu...@joedog.org>.
For the invoker servlet being commented out by default:
http://tomcatfaq.sourceforge.net/miscellaneous.html

-Tim

Sergei Ostavnenko wrote:
> Yoav,
> 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
> 
> 


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