A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
response.getWriter() out and jsp out differ
Joined: Aug 14, 2009
Aug 20, 2009 19:22:17
page has out instance,but in
we can get one out instance by response.getWriter() ;
In servlet ,out is org.apache.catalina.connector.CoyoteWriter instance;
In jsp page ,out is org.apache.jasper.runtime.JspWriterImpl instance;
Joined: Dec 21, 2006
Aug 20, 2009 19:48:12
As I know in
we have two choices for output:
PrintWriter: printing text data to a character stream.
PrintWriter writer = response.getWriter(); writer.println("some text");
OutputStream:writing any thing else
printwriter actually wraps the ServletOutputStream.
ServletOutputStream out = response.getOutputStream(); out.write(ByteArray);
PrintWriter has reference to the ServletOutputStream.
Joined: Nov 06, 2000
Aug 21, 2009 06:37:38
The JSP's out object has most of the same methods returned by the servlets getWriter(), however it adds some buffering capabilities.
Bosun (SCJP, SCWCD)
So much trouble in the world -- Bob Marley
Did you see how Paul
cut 87% off of his electric heat bill with 82 watts of micro heaters
subject: response.getWriter() out and jsp out differ
JSP can't send a binary file
send file to the client/ jspsmart
MySQL data to show on Tomcat
Servlet - PrintWriter error
How write for JSP inclusion?
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014