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.
Q 1 - Which of the following feature is present in Struts 2?
All of the above features are supported in Struts 2.
Q 2 - Which of the following is true about action tag in struts.xml?
Both of the above statements are correct.
Q 3 - Which of the following is correct about the OGNL?
Both of the above options are correct.
Q 4 - What should be the name of xml file used for validation in struts?
The xml file needs to be named '[action-class]'-validation.xml.
Q 5 - What is the purpose of @Results annotation?
A @Results annotation is a collection of results. Under the @Results annotation, we can have multiple @Result annotations.
Q 6 - What is the purpose of @BeforeResult annotation?
The @BeforeResult annotation marks a action method that needs to be executed before the result. Return value is ignored.
Q 7 - What is the purpose of @CustomValidator annotation?
This annotation can be used for custom validators. Use the ValidationParameter annotation to supply additional params.
Q 8 - Which of the following tag takes two or more lists as parameters and merge them all together?
These merge tag take two or more lists as parameters and merge them all together.
Q 9 - Which of the following tag is used to render a I18n text message?
The text tag is used to render a I18n text message.
Q 10 - Struts2 promotes less configuration with the help of using default values for various settings.
Struts2 promotes less configuration with the help of using default values for various settings. You don't have to configure something unless it deviates from the default settings set by Struts2.