What is the difference between JspWriter and PrintWriter
Answers were Sorted based on User's Feedback
Answer / srinivaskumar.nimmana
This abstract class emulates some of the functionality
found in the java.io.BufferedWriter and java.io.PrintWriter classes,
however it differs in that it throws java.io.IOException from the print methods while PrintWriter does not
Is This Answer Correct ? | 10 Yes | 3 No |
Answer / toharpreet
Including basic differences also
1) Package Difference
One is in IO and other is in java x packages
JSPWriter - package javax.servlet.jsp;
PrintWriter - package java.io;
2) Type Differences
One is Abstract class other is class
public class PrintWriter extends Writer {
public abstract class JspWriter extends Writer {
Is This Answer Correct ? | 7 Yes | 0 No |
Answer / srinivaskumar.nimmana
JspWriter is abstract class emulates some of the functionality found in the java.io.BufferedWriter and java.io.PrintWriter classes, however it differs in that it throws java.io.IOException from the print methods while PrintWriter does not
Is This Answer Correct ? | 5 Yes | 2 No |
JspWriter class Object is used to print the value in Jsp Page. it is not the object of JspWriter abstarct class it is the object of the class that implements JspWriter i.e. Writer....
PrintWriter class Of java.io package create an objectthatis used in servlet to print the value on console.
Is This Answer Correct ? | 0 Yes | 0 No |
What is the structure of the http response
What is the difference between CGI and Servlet?
Is there any need to shutdown the web server, if you want to modify a servlet?
Differentiate between get and post?
What is the difference between Servlets and Applets?
Can you explain in detail 'javax.servlet' package?
What are the functions of Servlet container?
what is a session object?
Hi frnds iam new to Java Kindy any one can provide or me Servlets Example code and can explain to me flow of servlets and as Jsp and Struts and provide to me some sample example on these 3 topic flow,code example,and tutorials,and related websites which i can refer....thanks in advance..........
Write a simple servlet program to print the contents of html.
Can we get PrintWriter and ServletOutputStream both in a servlet?
What is ServletConfig object?