Struts2 Online Quiz


Advertisements


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.

Answer : A

Explanation

The dispatcher result type is the default type and is used if no other result type is specified.

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

A - expression validator

B - int validator

C - regex validator

D - All of the above.

Answer : D

Explanation

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

Answer : A

Explanation

This validation annotation checks that a double field has a value within a specified range. If neither min nor max is set, nothing will be done.

Answer : C

Explanation

This validation annotation checks that a String field is not empty (i.e. non-null with a length > 0).

Answer : A

Explanation

This annotation annotation is used for class and application wide conversion rules. The TypeConversion annotation can be applied at property and method level.

Q 9 - Which of the following tag assigns a value to a variable in a specified scope?

A - set tag

B - text tag

C - url tag

D - push tag

Answer : A

Explanation

The set tag assigns a value to a variable in a specified scope. It is useful when you wish to assign a variable to a complex expression and then simply reference that variable each time rather than the complex expression. The scopes available are application, session, request, page and action.

Q 10 - Struts2 promotes less configuration with the help of using default values for various settings.

A - true

B - false

Answer : A

Explanation

Struts2 promotes less configuration with the help of using default values for various settings. You don't have to configure something unless it deviates from the default settings set by Struts2.


struts_questions_answers.htm

Advertisements