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

Q 1 - Which of the following is not a part of Struts architecture?

A - Actions

B - Interceptors

C - EJB

D - Value Stack / OGNL

Answer : C

Explanation

EJBs are not a part of Struts architecture.

Answer : C

Explanation

These objects include #application, #session, #request, #attr and #parameters and refer to the corresponding servlet scopes.

Answer : D

Explanation

All of the above are Struts2 error message keys that can come during file uploading process.

Q 5 - Which of the following theme is the default theme used by Struts 2?

A - simple theme

B - xhtml theme

C - css_xhtml theme

D - complex theme.

Answer : B

Explanation

xhtml theme - This is the default theme used by Struts 2 and provides all the basics that the simple theme provides and adds several features like standard two-column table layout for the HTML, Labels for each of the HTML, Validation and error reporting etc.

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 will iterate over a value?

A - if and else tags.

B - iterator tags

C - merge tag

D - append tag

Answer : B

Explanation

These iterator will iterate over a value. An iterable value can be any of: java.util.Collection, java.util.Iterator. While iterating over an iterator, you can use Sort tag to sort the result or SubSet tag to to get a sub set of the list or array.

Q 9 - Which of the following tag is used to render a I18n text message?

A - set tag

B - text tag

C - url tag

D - push tag

Answer : B

Explanation

The text tag is used to render a I18n text message.

Q 10 - Struts2 is popular and mature web application framework based on the MVC design pattern.

A - true

B - false

Answer : A

Explanation

Struts2 is popular and mature web application framework based on the MVC design pattern.

struts_questions_answers.htm
Advertisements