
- 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
- 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 jspInit() method of HttpJspPage class?
A - void jspInit(HTTPRequest request, HTTPResponse response)
B - void jspInit(HTTPRequest request, HTTPResponse response) throws ServletException, IOException
Answer : C
Explaination
Correct Signature is void jspInit()
Q 2 - session is instance of which class?
Answer : B
Explaination
request is object of HttpSession.
Q 3 - What JSP stands for?
Answer : D
Explaination
JSP stands for Java Server Pages.
Q 4 - Which of the following is true about page scope?
A - Object created with request scope are accessible only from the page in which they are created.
B - Object created with request scope are accessible only from the pages which are in same session.
Answer : A
Explaination
Object created with request scope are accessible only from the page which they are created. Object data gets lost once response is returned or request is forwarded.
Q 5 - config is instance of which class?
A - javax.servlet.ServletContext
Answer : B
Explaination
The config object is an instantiation of javax.servlet.ServletConfig and is a direct wrapper around the ServletConfig object for the generated servlet.
Q 6 - What happens when buffer is set to a value "none"?
A - Servlet output is immediately directed to the response output object.
Answer : A
Explaination
When buffer is set to "none", servlet output is immediately directed to the response output object.
Answer : A
Explaination
The default value (true) of isScriptingEnabled attribute enables scriptlets, expressions, and declarations.
Q 8 - Which of the following depicts correct order of phases in JSP life cycle?
A - Compilation, Initialization, Execution, Cleanup
B - Initialization, Compilation, Cleanup, Execution
Answer : A
Explaination
Compilation, Initialization, Execution, Cleanup is the correct order.
Q 9 - What JSTL stands for?
Answer : A
Explaination
JSTL, JavaServer Pages Standard Tag Library is a collection of useful JSP tags which encapsulates core functionality common to many JSP applications.
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.