Please browse the categories below to previous answers to questions like yours. If you do not find the answer for your particular situation, ask for help on the appropriate mailing list.
(Answer) (Category) Java Apache Project : (Category) Apache JServ 1.0 : (Category) Programming and Misc. Tidbits :
I'm getting Html as text in the page when it is returned from a servlet...why?
----------
From: Devesh Gupta devesh@india.adventnet.com
To: "Java Apache Users" java-apache-users@list.working-dogs.com
Subject: Re: JServ - Servlet Problem
Date: Fri, May 7, 1999, 2:15 AM


call res.setContentType("text/html") in your servlet before writing into
the stream .

-devesh


At 01:31 PM 5/7/99 +0530, you wrote:
>Hi Everybody,
>
>I have the following configuration:
>
>1. Apache JServ 1.0b4.
>2. Apache Server 1.3.6
>3. JSDK 2.0
>4. Thin JDBC to connect to Oracle Database
>5. OS - Solaris 2.6 Sparc Version
>
>I have written a servlet which will talk to database and after success
>or failure it will throw a html page. Using above setup I m getting html
>as text. It is not coming as html file on the browser.
>
>Can any one help me on this? Is there any setting to be done in
>httpd.conf or in any other configuration file? Or is there any patch? Or
>is it a bug?
>
>Thanks in advance,
>
>Regds,
>
>Venkatraman K
[Append to This Answer]
Previous: (Answer) How do I access environment variables from my servlet?
Next: (Answer) Why are we using Java?
This document is: http://java.apache.org/faq/?file=140
[Search] [Appearance] [Show Expert Edit Commands]
This is a Faq-O-Matic 2.709.
Please browse the categories below to previous answers to questions like yours. If you do not find the answer for your particular situation, ask for help on the appropriate mailing list.