- 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 - request is instance of which class?
Answer : C
Explaination
request is object of HttpServletRequest.
Q 2 - If a jsp is to generate a xml page, what attribute of page directive it should use?
Answer : D
Explaination
<%page contentType="text/xml">
Answer : A
Explaination
Yes, all servlets are required to be mapped/configured in web.xml
Q 4 - Which of the following attribute is used to have uncaught run-time exceptions automatically forwarded to an error processing page?
Answer : B
Explaination
<%@ page errorPage="error.jsp" %>
It will redirect the browser to the JSP page error.jsp if an uncaught exception is encountered during request processing.
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 - 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 - Which of the following is true about info Attribute?
A - The info attribute lets you provide a description of the JSP.
B - The info attribute is used by JSP container for optimization of generated servlet code.
Answer : A
Explaination
The info attribute lets you provide a description of the JSP.
Q 8 - Is it possible to include files using absolute path in a JSP page using include directive?
Answer : A
Explaination
No! include directive takes relative URL with respect to current domain of web application.
Answer : A
Explaination
Yes. JSP technology is extensible through the development of custom actions, or tags, which are encapsulated in tag libraries.
Q 10 - What is the use of <c:set > tag?
A - It can save values to database.
B - It evaluates an expression and uses the results to set a value of a JavaBean.
Answer : B
Explaination
The <c:set > tag is JSTL-friendly version of the setProperty action. The tag is helpful because it evaluates an expression and uses the results to set a value of a JavaBean or a java.util.Map object.
To Continue Learning Please Login
Login with Google