- 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.
Answer : C
Explaination
export is not a page directive.
Q 3 - Which is the methods of generated Servlet?
Answer : D
Explaination
All of the above methods get generated in generated servlet.
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.
Answer : A
Explaination
A value of true (default) indicates automatic buffer flushing and a value of false throws an exception.
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 - Which of the following is true about <jsp:getProperty> action?
Answer : C
Explaination
The getProperty action is used to retrieve the value of a given property and converts it to a string, and finally inserts it into the output.
Answer : B
Explaination
No. You are supposed to make use of only a JSPWriter object (given to you in the form of the implicit object out) for replying to clients.
Q 10 - Which of the following is true about <c:param> tag?
A - The <c:param> tag allows proper URL request parameter to be specified with URL.
B - The <c:param> tag does any necessary URL encoding required
Answer : C
Explaination
The <c:param> tag allows proper URL request parameter to be specified with URL and it does any necessary URL encoding required.