File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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:
: printing text data to a character stream.
PrintWriter writer = response.getWriter(); writer.println("some text");
:writing any thing else
printwriter actually wraps the
ServletOutputStream out = response.getOutputStream(); out.write(ByteArray);
has reference to the
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
I agree. Here's the link:
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