- Basic JSP Tutorial
- JSP - Home
- JSP - Overview
- JSP - Environment Setup
- JSP - Architecture
- JSP - Lifecycle
- JSP - Syntax
- JSP - Directives
- JSP - Actions
- JSP - Implicit Objects
- JSP - Client Request
- JSP - Server Response
- JSP - Http Status Codes
- JSP - Form Processing
- JSP - Writing Filters
- JSP - Cookies Handling
- JSP - Session Tracking
- JSP - File Uploading
- JSP - Handling Date
- JSP - Page Redirect
- JSP - Hits Counter
- JSP - Auto Refresh
- JSP - Sending Email
- Advanced JSP Tutorials
- JSP - Standard Tag Library
- JSP - Database Access
- JSP - XML Data
- JSP - Java Beans
- JSP - Custom Tags
- JSP - Expression Language
- JSP - Exception Handling
- JSP - Debugging
- JSP - Security
- JSP - Internationalization
- JSP Useful Resources
- JSP - Questions and Answers
- JSP - Quick Guide
- JSP - Useful Resources
- JSP - Discussion
JSP Online Quiz
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?
A - void jspDestroy(HTTPRequest request, HTTPResponse response)
B - void jspDestroy(HTTPRequest request, HTTPResponse response) throws ServletException, IOException
Answer : C
Explaination
Correct Signature is
void jspDestroy()
Answer : C
Explaination
export is not a page directive.
Q 3 - Which of the following attributes are mandatory in <jsp:setProperty /> tag?
Answer : A
Explaination
The setProperty action sets the properties of a Bean. The Bean must have been previously defined before this action.
Q 4 - Which of the following attribute is used to have uncaught run-time exceptions automatically forwarded to an error processing page?
Answer : B
Explaination
<%@ 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 - application is instance of which class?
Answer : A
Explaination
The application object is direct wrapper around the ServletContext object for the generated Servlet and in reality an instance of a javax.servlet.ServletContext object.
Q 6 - Which of the following is true about isELIgnored Attribute?
A - The isELIgnored option gives you the ability to disable the evaluation of scriplets.
B - The isELIgnored option gives you the ability to disable the evaluation of java code in jsp.
Answer : C
Explaination
The isELIgnored option gives you the ability to disable the evaluation of Expression Language (EL) expressions. The default value of the attribute is true, meaning that expressions, ${...}, are evaluated as dictated by the JSP specification. If the attribute is set to false, then expressions are not evaluated but rather treated as static text.
Q 7 - What will happen if isELIgnored attribute is set as false?
A - Expression Language (EL) expressions will not be evaluated and will be treated as static text.
B - JSP container will ignore the EL expressions similar to comments.
Answer : A
Explaination
If the attribute is set to false, then expressions are not evaluated but rather treated as static text.
Q 8 - Which of the following is true about Cleanup phase in JSP life cycle?
B - The jspDestroy() method is the JSP equivalent of the destroy method for servlets.
Answer : C
Explaination
The destruction phase of the JSP life cycle represents when a JSP is being removed from use by a container.The jspDestroy() method is the JSP equivalent of the destroy method for servlets.
Q 9 - What is Localization?
A - Localization refers to creating local content on a website.
B - Localization refers to adding locale related information to a website.
Answer : C
Explaination
Localization means adding resources to a web site to adapt it to a particular geographical or cultural region for example Hindi translation to a web site.
Q 10 - Which of the following is true about <c:param> tag?
A - The <c:param> tag allows proper URL request parameter to be specified with URL.
B - The <c:param> tag does any necessary URL encoding required
Answer : C
Explaination
The <c:param> tag allows proper URL request parameter to be specified with URL and it does any necessary URL encoding required.
To Continue Learning Please Login
Login with Google