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

Explanation

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

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 class of struts is responsible to convert String to data types?

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 : 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 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 will allow you to format a Date in a quick and easy way?

A - date tag

B - param tag

C - property tag

D - push tag

Answer : A

Explanation

The date tag will allow you to format a Date in a quick and easy way.

Answer : C

Explanation

Both of the above statements are correct.


struts_questions_answers.htm

Advertisements