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.

Q 3 - Which interceptor is responsible for file upload support?

A - FileUpload

B - File

C - Upload

D - None of the above.

Answer : A

Explanation

File uploading in Struts is possible through a pre-defined interceptor called FileUpload interceptor which is available through the org.apache.struts2.interceptor.

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

Explanation

This validation annotation checks that a String field is not empty (i.e. non-null with a length > 0).

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