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

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

It calls the standard response.sendRedirect() method, causing the browser to create a new request to the given location.

Q 5 - Which of the following theme is the default theme used by Struts 2?

A - simple theme

B - xhtml theme

C - css_xhtml theme

D - complex theme.

Answer : B

Explanation

xhtml theme - This is the default theme used by Struts 2 and provides all the basics that the simple theme provides and adds several features like standard two-column table layout for the HTML, Labels for each of the HTML, Validation and error reporting etc.

Answer : A

Explanation

This validation annotation checks that a double field has a value within a specified range. If neither min nor max is set, nothing will be done.

Q 8 - Which of the following tag is to be used to include a JSP file in another JSP page?

A - generator tag

B - action tag

C - include tag

D - bean tag

Answer : C

Explanation

The include tag will be used to include a JSP file in another JSP page.

Q 9 - Which of the following tag is used to get the property of a value, which will default to the top of the stack if none is specified?

A - date tag

B - param tag

C - property tag

D - push tag

Answer : C

Explanation

The property tag is used to get the property of a value, which will default to the top of the stack if none is specified.

Q 10 - Struts2 offers integrated profiling to debug and profile the application.

A - false

B - true

Answer : B

Explanation

Struts2 offers integrated profiling to debug and profile the application. In addition to this, Struts also offers integrated debugging with the help of built in debugging tools.


struts_questions_answers.htm

Advertisements