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

Explanation

All of the above steps are part of the life cycle of a request in Struct2 application.

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.

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 represents minimal theme with no "bells and whistles".?

A - simple theme

B - xhtml theme

C - css_xhtml theme

D - complex theme.

Answer : A

Explanation

simple theme - A minimal theme with no "bells and whistles". For example, the textfield tag renders the HTML tag without a label, validation, error reporting, or any other formatting or functionality.

Answer : A

Explanation

This annotation sets the CreateIfNull for type conversion. The CreateIfNull 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 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 - Tag markups in Struts2 can be tweaked using Freemarker templates.

A - true

B - false

Answer : A

Explanation

Tag markups in Struts2 can be tweaked using Freemarker templates. This does not require JSP or java knowledge. Basic HTML, XML and CSS knowledge is enough to modify the tags.

struts_questions_answers.htm
Advertisements