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

Answer : C

Explanation

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

Q 3 - What are the Struts2 configuration properties that control file uploading process?

A - struts.multipart.maxSize

B - struts.multipart.parser

C - struts.multipart.saveDir

D - All of the above.

Answer : D

Explanation

All of the above are Struts2 configuration properties that control file uploading process.

Q 4 - Can you override the default error message that can come during file uploading process?

A - yes

B - no

Answer : A

Explanation

You can override the text of these messages in WebContent/WEB-INF/classes/messages.properties resource files.

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

Explanation

This annotation sets the Element for type conversion. The Element annotation must be applied at field or 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 - To use MVC with Struts, you have to be comfortable with the standard JSP, Servlet APIs and a large & elaborate framework.

A - false

B - true

Answer : B

Explanation

To use MVC with Struts, you have to be comfortable with the standard JSP, Servlet APIs and a large & elaborate framework.

struts_questions_answers.htm
Advertisements