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.

Questions and Answers

Q 1 - Which of the following is not a implicit object?

A - request

B - response

C - cookie

D - session

Answer : C

Explaination

There is no cookie object in jsp.

Q 2 - Which of the following is a server side technology?

A - html

B - jsp

C - javaScript

D - css

Answer : B

Explaination

jsp is a server side technology.

Q 3 - Which is the methods of generated Servlet?

A - jspInit()

B - _jspService()

C - jspDestroy()

D - All of the above

Answer : D

Explaination

All of the above methods get generated in generated servlet.

Q 4 - Which of the following is an implicit object?

A - pageContext

B - servletContext

C - httpContext

D - sessionContext

Answer : A

Explaination

pageContext is an implicit object.

Answer : C

Explaination

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

Q 6 - What is default value of autoFlush Attribute?

A - true

B - false

Answer : A

Explaination

A value of true (default) indicates automatic buffer flushing and a value of false throws an exception.

Answer : D

Explaination

The session attribute indicates whether or not the JSP page uses HTTP sessions. A value of true means that the JSP page has access to a builtin session object and a value of false means that the JSP page cannot access the builtin session object.

Answer : A

Explaination

Compilation, Initialization, Execution, Cleanup is the correct order.

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.

jsp_questions_answers.htm
Advertisements