Home Interview Questions and Answers JSP Interview Questions and Answers For Graduates Part-3

JSP21.What happens when buffer is set to a value “none”?
When buffer is set to “none”, servlet output is immediately directed to the response output object.

22.What is autoFlush attribute?
The autoFlush attribute specifies whether buffered output should be flushed automatically when the buffer is filled, or whether an exception should be raised to indicate buffer overflow.

A value of true (default) indicates automatic buffer flushing and a value of false throws an exception.

23.What is contentType attribute?
The contentType attribute sets the character encoding for the JSP page and for the generated response page. The default content type is text/html, which is the standard content type for HTML pages.

24.What is errorPage attribute?
The errorPage attribute tells the JSP engine which page to display if there is an error while the current page runs. The value of the errorPage attribute is a relative URL.

25.What is isErrorPage attribute?
The isErrorPage attribute indicates that the current JSP can be used as the error page for another JSP.

The value of isErrorPage is either true or false. The default value of the isErrorPage attribute is false.

26.What is extends attribute?
The extends attribute specifies a superclass that the generated servlet must extend.

27.What is import attribute?
The import attribute serves the same function as, and behaves like, the Java import statement. The value for the import option is the name of the package you want to import.

28.What is info attribute?
The info attribute lets you provide a description of the JSP.

29.What is isThreadSafe attribute?
The isThreadSafe option marks a page as being thread-safe. By default, all JSPs are considered thread-safe. If you set the isThreadSafe option to false, the JSP engine makes sure that only one thread at a time is executing your JSP.

30.What is language attribute?
The language attribute indicates the programming language used in scripting the JSP page.

 

You may also like

Leave a Comment