- 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.
Answer : A
Explaination
JSP container creates _jspService() methods so it should not be overridden.
Q 2 - if isThreadSafe attribute of page directive is set as true, then generated servlet implements SingleThreadModel interface.
Answer : B
Explaination
If isThreadSafe attribute of page directive is set as false, then generated servlet implements SingleThreadModel interface.
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 page 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 : A
Explaination
Object created with request scope are accessible only from the page which they are created. Object data gets lost once response is returned or request is forwarded.
Q 5 - Which of the following method can be used to read a form parameter in JSP?
Answer : A
Explaination
You call request.getParameter() method to get the value of a form parameter.
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 - 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.
Q 9 - Which of the following is true about response.sendRedirect(url)?
A - The sendRedirect sends HTTP temporary redirect response to the browser.
Answer : C
Explaination
sendRedirect sends HTTP temporary redirect response to the browser, and browser creates a new request to go the redirected page.
Q 10 - Which of the following is true about <c:forEach > tag?
B - The <c:forEach > is used to iterate over a list of items in jsp.
Answer : C
Explaination
The <c:forEach > tag exists as a good alternative to embedding a Java for, while, or do-while loop via a scriptlet.
To Continue Learning Please Login
Login with Google