You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Jim Rudnicki <jd...@pacbell.net> on 2000/05/01 09:30:49 UTC

Re: servlet respose is not interpeted by the browser

I'm 99% sure you are missing this

  response.setContentType("text/html");

In your servlet doGet().  This statement causes the MIME type to be
prepended to the output.  The browser is looking for this to determine what
to do with the data that follows.  The browser does not guess that the data
is html, text, jpeg, gif, etc.

gnite
Jim
----- Original Message -----
From: "Marcos Martinez" <ma...@vfh.hs-bremerhaven.de>
To: <ge...@jakarta.apache.org>; <to...@jakarta.apache.org>
Sent: Friday, April 28, 2000 6:16 AM
Subject: servlet respose is not interpeted by the browser


> My problem is that when i get the output of one servlet, the only thing
> which i am able to see, is the html page, as if it was a test file, I
> mean that i get in my broser all the code of the dinamic html page which
> was generated by the servlet. it seems like my browser was not able to
> understand html, and the display the source code instead of the real
> content.
>
>
> Thanks for all.
>
> --------------------------------------------------------------------------
> To unsubscribe, email: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commmands, email: tomcat-user-help@jakarta.apache.org
>