I Solved it. Just response.setContentType("text/html");

-----Original Message-----
From: Daxin Zuo [mailto:[EMAIL PROTECTED]
Sent: Friday, October 08, 2004 3:01 PM
To: Tomcat Users List
Subject: PrintWriter is different on Tomcat and Apache?


I have servlets using code like:

StringBuffer sb= new StringBuffer();
AJavaClass.aMethod(sb);
PrintWriter out = response.getWriter();
out.println(bf.toString())

When the servlet is run from Tomcat, it is fine, but if I run it on Apache,
the whole source code is written on the browser, instead display the web
page with qui.

What is wrong? Thanks.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to