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

Q 1 - Which of the following is not a part of Struts architecture?

A - MDBs

B - Results / Result types

C - Value Stack / OGNL

D - View technologies

Answer : C

Explanation

MDBs are not a part of Struts architecture.

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.

Q 4 - Can you override the default error message that can come during file uploading process?

A - yes

B - no

Answer : A

Explanation

You can override the text of these messages in WebContent/WEB-INF/classes/messages.properties resource files.

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

Q 10 - Struts2 is popular and mature web application framework based on the MVC design pattern.

A - true

B - false

Answer : A

Explanation

Struts2 is popular and mature web application framework based on the MVC design pattern.


struts_questions_answers.htm

Advertisements