What is the out implicit object in JSP?

JSPJava 8Object Oriented ProgrammingProgramming

The out implicit object is an instance of a javax.servlet.jsp.JspWriter object and is used to send content in a response.

The initial JspWriter object is instantiated differently depending on whether the page is buffered or not. Buffering can be easily turned off by using the buffered = 'false' attribute of the page directive.

The JspWriter object contains most of the same methods as the java.io.PrintWriter class. However, JspWriter has some additional methods designed to deal with buffering. Unlike the PrintWriter object, JspWriter throws IOExceptions.

Following table lists out the important methods that we will use to write boolean char, int, double, object, String, etc.

Sr.No.Method & Description
1out.print(dataType dt)
Print a data type value
2out.println(dataType dt)
Print a data type value then terminate the line with new line character.
3out.flush()
Flush the stream.
raja
Published on 27-Mar-2019 13:52:49
Advertisements