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

Explanation

Model - The lowest level of the pattern which is responsible for maintaining data.

Q 4 - In which of the following internationalization (i18n) support is present in Struts 2?

A - The UI Tags.

B - Messages and Errors.

C - Within action classes.

D - All of the above.

Answer : D

Explanation

Struts2 provides localization ie. internationalization (i18n) support through resource bundles, interceptors and tag libraries in all of the above places.

Q 5 - Which of the following theme provides all the basics that the simple theme provides and adds several features like standard two-column CSS-based layout?

A - simple theme

B - xhtml theme

C - css_xhtml theme

D - complex theme.

Answer : C

Explanation

css_xhtml theme - This theme provides all the basics that the simple theme provides and adds several features like standard two-column CSS-based layout, using for the HTML Struts Tags, Labels for each of the HTML Struts Tags, placed according to the CSS stylesheet.

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

Explanation

This validation annotation checks that a field is non-null. The annotation must be applied at method level.

Q 8 - Which of the following tag performs basic if-else conditional flow?

A - if and else tags.

B - iterator tags

C - merge tag

D - append tag

Answer : A

Explanation

These tags perform basic condition flow found in every language. 'If' tag could be used by itself or with 'Else If' Tag and/or single/multiple 'Else' Tag.

Q 9 - Which of the following tag is used to get the property of a value, which will default to the top of the stack if none is specified?

A - date tag

B - param tag

C - property tag

D - push tag

Answer : C

Explanation

The property tag is used to get the property of a value, which will default to the top of the stack if none is specified.

Q 10 - Struts2 has a great support for multiple view options.

A - false

B - true

Answer : B

Explanation

Struts2 has a great support for multiple view options (JSP, Freemarker, Velocity and XSLT).

struts_questions_answers.htm
Advertisements