25+ Struts Interview Questions

25+ Struts Interview Questions

Struts Interview Questions

1) What is Struts? 

Swaggers is a system for creating MVC-based structure. Struts2 is the blend of Webwork and struts1 structures. 

2) What is the distinction somewhere in the range of struts1 and struts2? 

No. Struts1 Struts2

1) Action class isn't POJO. You have to acquire dynamic class. Action class is POJO. You don't have to acquire any class or execute any interface.

2) Front controller is ActionServlet. Front Controller is StrutsPrepareAndExecuteFilter.

3) It utilizations the idea of RequestProcessor class while handling request. It utilizes the idea of Interceptors while preparing the solicitation.

4) It has JSP for the view component. It has JSP, Freemarker, Valocity and so forth for the view part.

5) Configuration document name can be [anyname].xml and set inside WEB-INF directory. Configuration record must be struts.xml and set inside classes catalog.

6) Action and Model are separate. Action and Model are joined inside activity class.

3) What are the highlights of Struts? 

Setup MVC parts

POJO based activity

AJAX Support

Different Tag Support

Different Result Types

Reconciliation Support

4) What is MVC? 

MVC is a structure design. MVC represents Model, View and Controller. Show speaks to information, see speaks to introduction and controller goes about as an interface among model and view.

mvc engineering

5) What is interceptor? 

Interceptor is an article for example conjured at preprocessing and postprocessing of a solicitation. It is pluggable. 

6) What are the existence cycle techniques for interceptor? 

open void init()

open void intercept(ActionInvocation ai)

open void pulverize()

7) What is ValueStack? 

ValueStack is a stack that contains application explicit article, for example, activity and other model. 

8) What is ActionContext? 

ActionContext is a compartment in which activity is executed. It is one of a kind for each string. 

9) What is ActionInvocation? 

ActionInvocation is capable to summon activity. It holds activity and interceptor objects. 

10) What is OGNL? 

OGNL is an articulation language of struts2. It represents Object Graph Navigation Language. 

11) What are the 5 constants of Action interface? 

Victory

Blunder

Information

LOGIN

NONE

12) What does params interceptor? 

The params (otherwise called parameters) interceptor sets all parameters on the ValueStack. 

13) What does execAndWait interceptor? 

The execAndWait (otherwise called ExecuteAndWait) interceptor is utilized to show middle of the road or hold up result. 

14) What does modelDriven interceptor? 

The modelDriven interceptor makes other model as the default object of ValueStack. Of course, activity is the default object of ValueStack. 

15) What does approval interceptor? 

The approval interceptor performs approval checks and includes field-level and activity level blunder messages. 

16) What are the packaged validators? 

requiredstring

stringlength

email

date

int

twofold

url

regex

17) What is the contrast between plain-validator and field-validator? 

In plain-validator one validator can be connected to numerous fields. In field-validator numerous validators can be connected to single field. 

18) What is the utilization of jsonValidation? 

The jsonValidation interceptor is utilized to perform nonconcurrent approval. It works with approval and work process interceptors. 

19) What are the mindful interfaces in struts2? 

Mindful interfaces are utilized to store data in solicitation, session, application and reaction objects. The 4 mindful interfaces are given underneath:

ServletRequestAware

ServletResponseAware

SessionAware

ServletContextAware

20) What does i18n interceptor? 

The i18n interceptor is utilized to give multi lingual help to swaggers application.