Struts2 Mock Test


Advertisements


This section presents you various set of Mock Tests related to Struts2 Framework. 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 A
2 B
3 C
4 D
5 D
6 C
7 C
8 D
9 D
10 D
11 D
12 C
13 C
14 D
15 D
16 C
17 D
18 C
19 A
20 A
21 B
22 C
23 C
24 A
25 B

struts_questions_answers.htm

Advertisements
E-Books Store