Struts2 Mock Test


This section presents you various set of Mock Tests related to Struts2. You can download these sample mock tests at your local machine and solve offline at your convenience. Every mock test is supplied with a mock test key to let you verify the final score and grade yourself.

Questions and Answers

Struts2 Mock Test I

Answer : A

Explanation

Model - The lowest level of the pattern which is responsible for maintaining data.

Answer : B

Explanation

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

Answer : C

Explanation

Controller - Software Code that controls the interactions between the Model and View.

Q 4 - Which of the following feature is present in Struts 2?

A - POJO forms and POJO actions

B - Tag support

C - AJAX support

D - All of the above.

Answer : D

Explanation

All of the above features are supported in Struts 2.

Answer : D

Explanation

All of the above features are supported in Struts 2.

Q 6 - 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.

Q 7 - Which of the following is not a part of Struts architecture?

A - MDBs

B - Results / Result types

C - Value Stack / OGNL

D - View technologies

Answer : C

Explanation

MDBs are not a part of Struts architecture.

Answer : D

Explanation

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

Answer : D

Explanation

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

Answer : D

Explanation

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

Answer : C

Explanation

Both of the above statements are correct.

Answer : D

Explanation

All of the above statements are correct.

Answer : C

Explanation

Both of the above statements are correct.

Q 19 - What is defeult result type?

A - dispatcher

B - FreeMaker

C - redirect

D - None of the above.

Answer : A

Explanation

The dispatcher result type is the default type and is used if no other result type is specified.

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.

Answer : C

Explanation

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

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.

Answer : B

Explanation

If you are using model objects in your struts application, the current model object is placed before the action on the value stack.

Answer Sheet

Question Number Answer Key
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
struts_questions_answers.htm
Advertisements