Advanced Java Programming (3160707) MCQs

MCQs of Java Server Pages

Showing 11 to 20 out of 30 Questions
11.
______ attribute simply sets the information of the JSP page which is retrieved later by using getServletInfo().
(a) page
(b) pageContext
(c) pageInfo
(d) Info
Answer:

Option (d)

12.
The default size of the page directive buffer is?
(a) 8mb
(b) 16mb
(c) 8kb
(d) 16kb
Answer:

Option (c)

13.
What is the default value of language attribute in page directive?
(a) java
(b) jsp
(c) html
(d) java script
Answer:

Option (a)

14.
What is default value of isELIgnored.
(a) True
(b) False
Answer:

Option (b)

15.
What happens if you set the isThreadSafe = false?
(a) The JSP engine makes sure that mutiple thread at a time is executing your JSP.
(b) The JSP engine makes sure that only one thread at a time is executing your JSP.
(c) The JSP engine makes sure no threads are running.
(d) None of these.
Answer:

Option (b)

16.
The ______ attribute is used to declare that the current page is the error page.
(a) errorPage
(b) isErrorPage
(c) error
(d) JSPError
Answer:

Option (b)

17.
For writing any data to the buffer, JSP provides an implicit object named _____
(a) buffer
(b) out
(c) request
(d) response
Answer:

Option (b)

18.
include directive is processed at the _____ time and Include action is processed at the _____ time.
(a) run, translation
(b) execution, run
(c) translation, run
(d) translation, excess
Answer:

Option (c)

19.
How we can handle runtime exception in jsp?
(a) <%@ page errorPage="error.jsp" %>
(b) <%@ page isErrorPage="true" %>
(c) web.xml <exception-type>
(d) all of these
Answer:

Option (d)

20.
Application is instance of ______ class.
(a) javax.servlet.ServletContext
(b) javax.servlet.Application
(c) javax.servlet.HttpContext
(d) javax.servlet.Context
Answer:

Option (a)

Showing 11 to 20 out of 30 Questions