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

Explanation

Controller - Software Code that controls the interactions between the Model and View.

Answer : C

Explanation

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

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.

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 enables developers to call actions directly from a JSP page by specifying the action name and an optional namespace?

A - generator tag

B - action tag

C - include tag

D - bean tag

Answer : B

Explanation

The action tag enables developers to call actions directly from a JSP page by specifying the action name and an optional namespace. The body content of the tag is used to render the results from the Action.

Q 9 - Which of the following tag is used to create a URL?

A - set tag

B - text tag

C - url tag

D - push tag

Answer : C

Explanation

The url tag is used to create a URL.

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