What is the difference between JspWriter and PrintWriter

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is Client-Server Computing?

1895


What are the different mode that servlets can be used?

549


how many jsp scripting elements are there and what are those?

542


Given the request path below, which are context path, servlet path and path info?

543


Define declaration.

616






Difference between forward() method and sendredirect() method ?

582


Is servlet a server side scripting language?

553


Explain how does JSP handle run-time exceptions?

580


Tell the new features added in servletrequest interface i.e. Servlet 2.4

573


What are important features of Servlet 3?

593


Can we use the constructor, instead of init(), to initialize servlet?

580


What are the types of protocols supported by httpservlet ?

704


What is the servlet?

618


If servlet receives multiple requests, how many objects will it create?

827


Explain the servlet context.

598