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

Explanation

View - This is responsible for displaying all or a portion of the data to the user.

Answer : A

Explanation

The dispatcher result type is the default type and is used if no other result type is specified.

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

Answer : A

Explanation

org.springframework.web.context.ContextLoaderListener acts as Listener class in struts and spring integration.

Answer : C

Explanation

Both of the above statements are correct.

struts_questions_answers.htm
Advertisements