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

Answer : D

Explanation

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

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.

Answer : C

Explanation

These objects include #application, #session, #request, #attr and #parameters and refer to the corresponding servlet scopes.

Answer : D

Explanation

All of the above are Struts2 error message keys that can come during file uploading process.

Answer : C

Explanation

This is used to decorate the execute() method. The Action method also takes in a value which is the URL on which the action is invoked.

Answer : C

Explanation

This annotation can be used for custom validators. Use the ValidationParameter annotation to supply additional params.

Q 8 - Which of the following tag will iterate over a value?

A - if and else tags.

B - iterator tags

C - merge tag

D - append tag

Answer : B

Explanation

These iterator will iterate over a value. An iterable value can be any of: java.util.Collection, java.util.Iterator. While iterating over an iterator, you can use Sort tag to sort the result or SubSet tag to to get a sub set of the list or array.

Answer : A

Explanation

org.springframework.web.context.ContextLoaderListener acts as Listener class in struts and spring integration.

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