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

Answer : B

Explanation

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

Q 3 - What are the Struts2 configuration properties that control file uploading process?

A - struts.multipart.maxSize

B - struts.multipart.parser

C - struts.multipart.saveDir

D - All of the above.

Answer : D

Explanation

All of the above are Struts2 configuration properties that control file uploading process.

Answer : D

Explanation

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

Answer : A

Explanation

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

Answer : A

Explanation

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

Q 8 - Which of the following tag enables developers to call actions directly from a JSP page by specifying the action name and an optional namespace?

A - generator tag

B - action tag

C - include tag

D - bean tag

Answer : B

Explanation

The action tag enables developers to call actions directly from a JSP page by specifying the action name and an optional namespace. The body content of the tag is used to render the results from the Action.

Q 9 - Which of the following tag assigns a value to a variable in a specified scope?

A - set tag

B - text tag

C - url tag

D - push tag

Answer : A

Explanation

The set tag assigns a value to a variable in a specified scope. It is useful when you wish to assign a variable to a complex expression and then simply reference that variable each time rather than the complex expression. The scopes available are application, session, request, page and action.

Q 10 - Struts2 promotes less configuration with the help of using default values for various settings.

A - true

B - false

Answer : A

Explanation

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.


struts_questions_answers.htm

Advertisements