- 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 - Which of the following is not a valid attribute of a page directives?
Answer : C
Explaination
export is not a valid attribute of 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 application 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 : D
Explaination
Object created with request scope are accessible only from the pages which resides in same application. Object data is global and is available to all pages.
Q 5 - Which of the following method can be used to read a multiple values with same name, for example check box selections?
Answer : C
Explaination
You call request.getParameterValues() method to get the value of a form parameter if the parameter appears more than once and returns multiple values.
Q 6 - Which of the following is true about import Attribute?
A - The import attribute serves the same function as, and behaves like, the Java import statement.
B - The value for the import option is the name of the package you want to import.
Answer : C
Explaination
The import attribute serves the same function as, and behaves like, the Java import statement. The value for the import option is the name of the package you want to import.
Q 7 - Which of the following is true about include directive?
A - The include directive is used to include a file during the translation phase.
Answer : C
Explaination
The include directive is used to includes a file during the translation phase. This directive tells the container to merge the content of other external files with the current JSP during the translation phase.
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 - 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