Struts Interview Questions
There is given as often as possible asked struts talk with inquiries and answers that has been asked in numerous organizations. How about we see the rundown of top Struts2 meet questions.
1) What is Struts?
Struts is a system for creating MVC-based structure. Struts2 is the mix of Webwork and struts1 structures.
2) What is the distinction somewhere in the range of struts1 and 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 utilizes the idea of RequestProcessor class while preparing request.||It utilizes the idea of Interceptors while handling the request.|
|4)||It has JSP for the view component.||It has JSP, Freemarker, Valocity and so forth for the view component.|
|5)||Configuration document name can be [anyname].xml and put inside WEB-INF directory.||Configuration record must be struts.xml and put inside classes directory.|
|6)||Action and Model are separate.||Action and Model are consolidated inside activity class.|
3) What are the highlights of Struts?
- Configuration MVC components
- POJO based action
- AJAX Support
- Various Tag Support
- Various Result Types
- Integration Support
4) What is MVC?
MVC is a structure design. MVC represents Model, View and Controller. Model speaks to information, see speaks to introduction and controller goes about as an interface among model and view.
5) What is interceptor?
Interceptor is an object for example conjured at preprocessing and postprocessing of a solicitation. It is pluggable.
6) What are the life cycle methods of interceptor?
- public void init()
- public void intercept(ActionInvocation ai)
- public void destroy()