Struts2 Online Quiz



Following quiz provides Multiple Choice Questions (MCQs) related to Struts2 Framework. 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 : D

Explanation

All of the above steps are part of the life cycle of a request in Struct2 application.

Q 4 - What types of validators are available in xml based validation in struts2?

A - date validator

B - double validator

C - email validator

D - All of the above.

Answer : D

Explanation

All of the above validators are available in xml based validation in struts2.

Answer : C

Explanation

This is used to decorate the execute() method. The Action method also takes in a value which is the URL on which the action is invoked.

Answer : D

Explanation

This validator checks that a String field is of the right length. It assumes that the field is a String. If neither minLength nor maxLength is set, nothing will be done.

Answer : D

Explanation

This annotation sets the KeyProperty for type conversion. The KeyProperty annotation must be applied at field or method level.

Q 9 - Which of the following tag is used to create a URL?

A - set tag

B - text tag

C - url tag

D - push tag

Answer : C

Explanation

The url tag is used to create a URL.

Q 10 - To use MVC with Struts, you have to be comfortable with the standard JSP, Servlet APIs and a large & elaborate framework.

A - false

B - true

Answer : B

Explanation

To use MVC with Struts, you have to be comfortable with the standard JSP, Servlet APIs and a large & elaborate framework.

struts_questions_answers.htm
Advertisements