
- 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
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
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 _jspService() method of HttpJspPage class?
A - void _jspService(HTTPRequest request, HTTPResponse response)
Answer : B
Explaination
Correct Signature is
void _jspService(HTTPRequest request, HTTPResponse response) throws ServletException, IOException
Q 2 - If a jsp is to generate a pdf page, what attribute of page directive it should use?
Answer : A
Explaination
<%page contentType="application/pdf">
Above tag is used to generate PDF using JSP.
Q 3 - Which of the following is true about request 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 : C
Explaination
Object created with request scope are accessible only from the pages which are processing the same request. Object data is available to another page in case of forward.
Q 4 - Which of the following is true about session 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 : B
Explaination
Object created with request scope are accessible only from the pages which are in same session. Object data is available till session is alive.
Q 5 - out is instance of which class?
A - javax.servlet.jsp.JspWriter
Answer : A
Explaination
The out implicit object is an instance of a javax.servlet.jsp.JspWriter object and is used to send content in a response.
Q 6 - Which of the following is true about extends Attribute?
A - The extends attribute can be used to define a subclass of generated servlet.
B - The extends attribute is used to specify a superclass that the generated servlet must extend.
Answer : B
Explaination
The extends attribute specifies a superclass that the generated servlet must extend.
Q 7 - What will happen if isScriptingEnabled attribute is set as false?
Answer : A
Explaination
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 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 Internationalization?
A - Internationalization means creating international content on a website.
C - Internationalization refers to creating local content on a website.
Answer : B
Explaination
Internationalization means enabling a web site to provide different versions of content translated into the visitor's language or nationality.
Q 10 - What is the use of <c:catch> tag?
A - to catch any Throwable that occurs in its body and optionally exposes it.
Answer : A
Explaination
The <c:catch> tag catches any Throwable that occurs in its body and optionally exposes it. Simply it is used for error handling and to deal more gracefully with the problem.