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

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

A - Actions

B - Interceptors

C - EJB

D - Value Stack / OGNL

Answer : C

Explanation

EJBs are not a part of Struts architecture.

Answer : B

Explanation

If you are using model objects in your struts application, the current model object is placed before the action on the value stack.

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

Explanation

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

Q 8 - Which of the following tag performs basic if-else conditional flow?

A - if and else tags.

B - iterator tags

C - merge tag

D - append tag

Answer : A

Explanation

These tags perform basic condition flow found in every language. 'If' tag could be used by itself or with 'Else If' Tag and/or single/multiple 'Else' Tag.

Q 9 - Struts uses the DOJO framework for the AJAX tag implementation.

A - true

B - false

Answer : A

Explanation

Struts uses the DOJO framework for the AJAX tag implementation.

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