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 is not a part of Struts architecture?

A - MDBs

B - Results / Result types

C - Value Stack / OGNL

D - View technologies

Answer : C

Explanation

MDBs are not a part of Struts architecture.

Answer : C

Explanation

It calls the standard response.sendRedirect() method, causing the browser to create a new request to the given location.

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

Explanation

A @Results annotation is a collection of results. Under the @Results annotation, we can have multiple @Result annotations.

Answer : D

Explanation

The @After annotation marks a action method that needs to be called after the main action method and the result was executed. Return value is ignored.

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 takes two or more lists as parameters and append them all together?

A - if and else tags.

B - iterator tags

C - merge tag

D - append tag

Answer : D

Explanation

These merge tag take two or more lists as parameters and append them all together.

Q 9 - Which of the following tag will allow you to format a Date in a quick and easy way?

A - date tag

B - param tag

C - property tag

D - push tag

Answer : A

Explanation

The date tag will allow you to format a Date in a quick and easy way.

Answer : C

Explanation

Both of the above statements are correct.


struts_questions_answers.htm

Advertisements