- 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 _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
Answer : C
Explaination
export is not a page directive.
Answer : B
Explaination
No, Jsp pages are not required to be mapped/configured in web.xml
Answer : B
Explaination
isErrorPage is required to be set true, it is false by default.
Q 5 - Which of the following method can be used to read a form parameter in JSP?
Answer : A
Explaination
You call request.getParameter() method to get the value of a form parameter.
Answer : A
Explaination
A value of true (default) indicates automatic buffer flushing and a value of false throws an exception.
Answer : A
Explaination
The default value (true) of isScriptingEnabled attribute enables scriptlets, expressions, and declarations.
Q 8 - Which of the following is true about Execution phase in JSP life cycle?
Answer : D
Explaination
Whenever a browser requests a JSP and the page has been loaded and initialized, the JSP engine invokes the _jspService() method in the JSP.The _jspService() method of a JSP is invoked once per a request and is responsible for generating the response for that request and this method is also responsible for generating responses to all seven of the HTTP methods ie. GET, POST, DELETE etc.
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:remove > tag?
A - It removes a item from a list
Answer : C
Explaination
The <c:remove > tag removes a variable from either a specified scope or the first scope where the variable is found (if no scope is specified).