- 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
Yes, jspInit() method can be overridden.
Q 2 - If a jsp is to generate a xml page, what attribute of page directive it should use?
Answer : D
Explaination
<%page contentType="text/xml">
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 language attribute?
A - The language attribute indicates the programming language used in scripting the servlet.
B - The language attribute indicates the programming language used in scripting the html page.
C - The language attribute indicates the programming language used in scripting the JSP page.
Answer : C
Explaination
The language attribute indicates the programming language used in scripting the JSP page.
Q 5 - pageContext is instance of which class?
A - javax.servlet.ServletContext
B - javax.servlet.ServletConfig
Answer : C
Explaination
The pageContext object is an instance of a javax.servlet.jsp.PageContext object. The pageContext object is used to represent the entire JSP page.
Q 6 - What are cookies?
Answer : A
Explaination
Cookies are text files stored on the client computer and they are kept for various information tracking purpose.
Q 7 - What will happen if isELIgnored attribute is set as false?
A - Expression Language (EL) expressions will not be evaluated and will be treated as static text.
B - JSP container will ignore the EL expressions similar to comments.
Answer : A
Explaination
If the attribute is set to false, then expressions are not evaluated but rather treated as static text.
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 - What JSTL stands for?
Answer : A
Explaination
JSTL, JavaServer Pages Standard Tag Library is a collection of useful JSP tags which encapsulates core functionality common to many JSP applications.
Q 10 - What's the difference between JavaBeans and taglib directives?
B - Custom tags are used to implement actions and JavaBeans are used to present information.
Answer : A
Explaination
JavaBeans and taglib fundamentals were introduced for reusability. But following are the major differences between them −
Taglibs are for generating presentation elements while JavaBeans are good for storing information and state.
Use custom tags to implement actions and JavaBeans to present information.
To Continue Learning Please Login
Login with Google