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

Explanation

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

Answer : A

Explanation

It is used to forward to a servlet, JSP, HTML page, and so on, on the server. It uses the RequestDispatcher.forward() method.

Answer : C

Explanation

It calls the standard response.sendRedirect() method, causing the browser to create a new request to the given location.

Q 4 - What types of validators are available in xml based validation in struts2?

A - expression validator

B - int validator

C - regex validator

D - All of the above.

Answer : D

Explanation

All of the above validators are available in xml based validation in struts2.

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 validation annotation checks that a double field has a value within a specified range. If neither min nor max is set, nothing will be done.

Answer : C

Explanation

This annotation sets the Key for type conversion. The Key annotation must be applied at field or method level.

Answer : A

Explanation

This annotation annotation is used for class and application wide conversion rules. The TypeConversion annotation can be applied at property and method level.

Q 9 - Which of the following tag can be used to parameterize other tags?

A - date tag

B - param tag

C - property tag

D - push tag

Answer : B

Explanation

The param tag can be used to parameterize other tags.

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