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

Answer : B

Explaination

Correct Signature is

void _jspService(HTTPRequest request, HTTPResponse response) throws ServletException, IOException

Q 2 - Which of the following is not a valid attribute of a page directives?

A - language

B - extend

C - export

D - import

Answer : C

Explaination

export is not a valid attribute of a page directive.

Q 4 - isErrorPage is by default true.

A - True

B - False

Answer : B

Explaination

isErrorPage is required to be set true, it is false by default.

Answer : A

Explaination

The out implicit object is an instance of a javax.servlet.jsp.JspWriter object and is used to send content in a response.

Answer : B

Explaination

The extends attribute specifies a superclass that the generated servlet must extend.

Answer : A

Explaination

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 : C

Explaination

Localization means adding resources to a web site to adapt it to a particular geographical or cultural region for example Hindi translation to a web site.

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.

jsp_questions_answers.htm
Advertisements