tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kitching Simon <Simon.Kitch...@orange.ch>
Subject RE: Netscape displaying the HTML code
Date Wed, 20 Dec 2000 10:49:25 GMT
I agree. I think the problem is that webservers normally set the
http content type attribute header by figuring it out from the
file suffix. However, in your case your servlet is serving the
code, not the webserver, so you need to do this in your servlet.

I guess that in the absence of any http content type header,
IE assumes HTML, while netscape assumes text. 

Regards,

Simon

> -----Original Message-----
> From:	Srinivas, Rajesh [SMTP:rajesh.srinivas@terayon.com]
> Sent:	Tuesday, December 19, 2000 10:23 PM
> To:	tomcat-user@jakarta.apache.org
> Subject:	RE: Netscape displaying the HTML code
> 
> hi,
>  I suppose you have to set the content type as text/html using the
> setContentType() method of response object.
> Hope this helps.
> Rajesh
> 
> -----Original Message-----
> From: Guntupalli Shanti [mailto:sguntupa@cisco.com]
> Sent: Tuesday, December 19, 2000 1:16 PM
> To: tomcat-user@jakarta.apache.org
> Subject: Netscape displaying the HTML code
> 
> 
> Hi,
> 
> I have tomcat 3.2 running on Apache 1.3.14.
> All the HTML content in my web site is returned by the servlets based on 
> the templates passed
> in the query. Something like
> 
> http://www.myserver.com:8070/examples/servlet/servletname?page=main
> 
> where main is a html template file.
> When I am accessing the page from IE I get exactly what I want
> but when I access this in netscape it displays all the HTML code.
> Does any one know how to fix it?
> 
> Thanks in advance
> Shanti

Mime
View raw message