- 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 - 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 : B
Explaination
jsp is a server side technology.
Answer : B
Explaination
No, Jsp pages are not required to be mapped/configured in web.xml
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 - Which of the following method can be used to read binary data stream coming from the client?
Answer : A
Explaination
You call request.getInputStream() method to read binary data stream coming from the client for example, image file uploaded.
Q 6 - What happens when buffer is set to a value "none"?
A - Servlet output is immediately directed to the response output object.
Answer : A
Explaination
When buffer is set to "none", servlet output is immediately directed to the response output object.
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: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 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: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