tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Tomsic <ptom...@yahoo.com>
Subject stack trace error when viewing html source, but the display in browser is good.
Date Wed, 15 Jan 2003 19:17:37 GMT
Has anyone ever seen the expected results in a browser
from their servlet, but when you view source, there is
a stack trace?

Not sure what would be causing this, but here's how
we're generating output to the browser:

public void printPage(HttpServletResponse response) {
  response.setContentType("text/html");
  // get content is a method that simply returns
  // a byte array of the content to send to the
  // browser
  byte[] b = getContent();

  ServletOutputStream out =
response.getOutputStream();
  out.write(b);

  ...
}

if I do a System.out.println(new String(b));
then that output shows me exactly what I see in the
browser, but when I view source on it in the browser, 
I get a stacktrace.

Any thoughts on this strange behaviour?

Thank you,
Paul



__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

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


Mime
View raw message