Following quiz provides Multiple Choice Questions (MCQs) related to JSP Fundamentals. You will have to read all the given answers and click over the correct answer. If you are not sure about the answer then you can check the answer using Show Answer button. You can use Next Quiz button to check new set of questions in the quiz.
Q 1 - What is the correct signature of jspDestroy() method of HttpJspPage class?
Correct Signature is
Q 2 - This object can be used to access other implicit objects in JSP.
pageContext can be used to retrieve other implicit objects using its methods like getPage(), getRequest() etc.
Q 3 - What JSP stands for?
JSP stands for Java Server Pages.
Q 4 - Which of the following attribute is used to have uncaught run-time exceptions automatically forwarded to an error processing page?
<%@ page errorPage="error.jsp" %>
It will redirect the browser to the JSP page error.jsp if an uncaught exception is encountered during request processing.
Q 5 - Where filters are defined?
Filters are defined in the deployment descriptor file web.xml and then mapped to either servlet or JSP names or URL patterns in your application's deployment descriptor.
Q 6 - Which of the following is true about buffer Attribute?
The buffer attribute specifies buffering characteristics for the server output response object.
Q 7 - What will happen if isScriptingEnabled attribute is set as false?
A translation-time error will be raised if the JSP uses any scriptlets, expressions (non-EL), or declarations.
Q 8 - Which of the following is true about <jsp:forward> action?
The forward action terminates the action of the current page and forwards the request to another resource such as a static page, another JSP page, or a Java Servlet.
Q 9 - Which of the following is true about locale?
Locale is a particular cultural or geographical region. It is usually referred to as a language symbol followed by a country symbol which are separated by an underscore. For example "en_US" represents english locale for US.
Q 10 - Which of the following is true about <c:param> tag?
The <c:param> tag allows proper URL request parameter to be specified with URL and it does any necessary URL encoding required.