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

Q 1 - Which of the following feature is present in Struts 2?

A - POJO forms and POJO actions

B - Tag support

C - AJAX support

D - All of the above.

Answer : D

Explanation

All of the above features are supported in Struts 2.

Answer : A

Explanation

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

Answer : A

Explanation

There are various temporary objects which are created during execution of a page. For example the current iteration value for a collection being looped over in a JSP tag.

Q 4 - What should be the name of xml file used for validation in struts?

A - '[action-class]'-validation.xml

B - validation.xml

C - Both of the above.

D - None of the above.

Answer : A

Explanation

The xml file needs to be named '[action-class]'-validation.xml.

Answer : C

Explanation

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

Q 8 - Which of the following tag generates an iterator based on the val attribute supplied?

A - generator tag

B - iterator tags

C - merge tag

D - append tag

Answer : A

Explanation

These generator tag generates an iterator based on the val attribute supplied.

Answer : B

Explanation

org.apache.struts2.dispatcher.FilterDispatcher acts as Dispatcher class in struts and spring integration.

Answer : C

Explanation

Both of the above statements are correct.


struts_questions_answers.htm

Advertisements