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

Explanation

View - This is responsible for displaying all or a portion of the data to the user.

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

Explanation

There are various temporary objects which are created during execution of a page. For example the current iteration value for a collection being looped over in a JSP tag.

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.

Answer : A

Explanation

A @Results annotation is a collection of results. Under the @Results annotation, we can have multiple @Result annotations.

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.

Q 9 - Which of the following tag is used to render a I18n text message?

A - set tag

B - text tag

C - url tag

D - push tag

Answer : B

Explanation

The text tag is used to render a I18n text message.

struts_questions_answers.htm
Advertisements