- 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
- 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
Yes, jspInit() method can 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.
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 attributes are used in <jsp:include /> tag?
Answer : B
Explaination
<jsp:include /> lets you insert files into the page being generated. The syntax looks like this −
<jsp:include page="relative URL" flush="true" />
Where page is the relative URL of the page to be included. Flush is the boolean attribute the determines whether the included resource has its buffer flushed before it is included.
Q 5 - application is instance of which class?
Answer : A
Explaination
The application object is direct wrapper around the ServletContext object for the generated Servlet and in reality an instance of a javax.servlet.ServletContext object.
Q 6 - Which of the following is true about buffer Attribute?
A - The buffer attribute specifies the size of buffer.
B - The buffer attribute specifies buffering characteristics for the server output response object.
Answer : C
Explaination
The buffer attribute specifies buffering characteristics for the server output response object.
Answer : A
Explaination
The default value of isELIgnored attribute is true, meaning that expressions, ${...}, are evaluated as dictated by the JSP specification.
Q 8 - Which of the following step is taken by JSP container during Compilation phase?
Answer : C
Explaination
The compilation process involves three steps: a) Parsing the JSP, b) Turning the JSP into a servlet, c) Compiling the servlet.
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:url> tag
A - The <c:url> tag formats a URL into a string and stores it into a variable.
B - The <c:url> tag automatically performs URL rewriting when necessary.
Answer : C
Explaination
The <c:url> tag formats a URL into a string and stores it into a variable. This tag automatically performs URL rewriting when necessary.