JSP Online Quiz


Advertisements

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.

Questions and Answers

Q 1 - jspDestroy() method of HttpJspPage class can be overridden.

A - True

B - False

Answer : A

Explaination

Yes, jspDestroy() method can be overridden.

Q 2 - What is default value of isThreadSafe?

A - True

B - False

Answer : A

Explaination

The isThreadSafe option marks a page as being thread-safe. By default, it is true and all JSPs are considered thread-safe.

Answer : A

Explaination

The scope attribute identifies the lifecycle of the Action element. It has four possible values: (a) page, (b) request, (c) session, and (d) application.

Q 4 - Which of the following is not a jsp directive?

A - include

B - page

C - scriptlet

D - useBean

Answer : C

Explaination

scriptlet is not a jsp directive.

Answer : C

Explaination

JSP Filters are Java classes that can be used in JSP Programming for both of the above purposes.

Answer : A

Explaination

When buffer is set to "none", servlet output is immediately directed to the response output object.

Answer : C

Explaination

The isELIgnored option gives you the ability to disable the evaluation of Expression Language (EL) expressions. The default value of the attribute is true, meaning that expressions, ${...}, are evaluated as dictated by the JSP specification. If the attribute is set to false, then expressions are not evaluated but rather treated as static text.

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

Internationalization means enabling a web site to provide different versions of content translated into the visitor's language or nationality.

Answer : C

Explaination

The <c:remove > tag removes a variable from either a specified scope or the first scope where the variable is found (if no scope is specified).

jsp_questions_answers.htm
Advertisements