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

Explanation

View - This is responsible for displaying all or a portion of the data to the user.

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

Explanation

The @result annotations have the name that correspond to the outcome of the execute method. They also contain a location as to which view should be served corresponding to return value from execute().

Answer : C

Explanation

This annotation can be used for custom validators. Use the ValidationParameter annotation to supply additional params.

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.

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