- 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 - response is instance of which class?
Answer : C
Explaination
request is object of HttpServletResponse.
Answer : A
Explaination
The isThreadSafe option marks a page as being thread-safe. By default, it is true and all JSPs are considered thread-safe.
Q 3 - Which of the following are the valid scopes in JSP?
A - request, page, session, application
B - request, page, session, global
Answer : A
Explaination
The scope attribute identifies the lifecycle of the Action element. It has four possible values: (a) page, (b) request, (c) session, and (d) application.
Answer : C
Explaination
scriptlet is not a jsp directive.
Q 5 - Which of the following method can be used to read parameters names?
Answer : C
Explaination
You call request.getParameterNames() method to get the names of all the parameters passed.
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 - Which of the following is true about isThreadSafe Attribute?
A - The isThreadSafe option marks a page as being thread-safe.
Answer : D
Explaination
The isThreadSafe option marks a page as being thread-safe. By default, all JSPs are considered thread-safe. If you set the isThreadSafe option to false, the JSP engine makes sure that only one thread at a time is executing your JSP.
Q 8 - Which of the following is true about <jsp:useBean> action?
Answer : C
Explaination
useBean action first searches for an existing object utilizing the id and scope variables. If an object is not found, it then tries to create the specified object. useBean is used to load java beans in jsp page.
Q 9 - How to pass information from JSP to included JSP?
Answer : A
Explaination
Using <%jsp:param> tag you can pass information from JSP to included JSP.
Q 10 - Which of the following is true about <c:url> tag
A - The <c:url> tag formats a URL into a string and stores it into a variable.
B - The <c:url> tag automatically performs URL rewriting when necessary.
Answer : C
Explaination
The <c:url> tag formats a URL into a string and stores it into a variable. This tag automatically performs URL rewriting when necessary.