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

Explanation

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

Answer : C

Explanation

Both of the above statements are correct.

Q 5 - Which class of struts is responsible to converts data types from string?

A - StrutsTypeConverter

B - StringTypeConverter

C - Both of the above.

D - None of the above.

Answer : A

Explanation

StrutsTypeConverter class tells Struts how to convert Environment to a String and vice versa by overriding two methods convertFromString() and convertToString().

Answer : D

Explanation

This validator checks that a String field is of the right length. It assumes that the field is a String. If neither minLength nor maxLength is set, nothing will be done.

Q 8 - Which of the following tag is to be used to include a JSP file in another JSP page?

A - generator tag

B - action tag

C - include tag

D - bean tag

Answer : C

Explanation

The include tag will be used to include a JSP file in another JSP page.

Q 9 - Which of the following tag assigns a value to a variable in a specified scope?

A - set tag

B - text tag

C - url tag

D - push tag

Answer : A

Explanation

The set tag assigns a value to a variable in a specified scope. It is useful when you wish to assign a variable to a complex expression and then simply reference that variable each time rather than the complex expression. The scopes available are application, session, request, page and action.

Q 10 - Struts2 has a great support for multiple view options.

A - false

B - true

Answer : B

Explanation

Struts2 has a great support for multiple view options (JSP, Freemarker, Velocity and XSLT).

struts_questions_answers.htm
Advertisements