- 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 - response is instance of which class?
Answer : C
Explaination
request is object of HttpServletResponse.
Q 2 - This object can be used to access other implicit objects in JSP.
Answer : D
Explaination
pageContext can be used to retrieve other implicit objects using its methods like getPage(), getRequest() etc.
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 attribute is used to mark a page as error processing page?
Answer : A
Explaination
<%@ page isErrorPage="true" %>
Within jsp, indicate that it is an error-processing page, using the above 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 autoFlush Attribute?
Answer : C
Explaination
The autoFlush attribute specifies whether buffered output should be flushed automatically when the buffer is filled, or whether an exception should be raised to indicate buffer overflow.
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 <jsp:forward> action?
A - The forward action terminates the action of the current page.
Answer : C
Explaination
The forward action terminates the action of the current page and forwards the request to another resource such as a static page, another JSP page, or a Java Servlet.
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 - What is the use of <c:if> tag?
A - It is used to check if jsp tag library is enabled or not.
Answer : B
Explaination
The <c:if> tag evaluates an expression and displays its body content only if the expression evaluates to true.
To Continue Learning Please Login
Login with Google