Struts Interview Questions And Answers

Struts Interview questions for freshers as well 1 to 3 year experienced on advance and basic Struts with examples that cover the essentials of Struts means all type of Struts questions covered under this page and also a form is given at the end of this page for those user who want more Interview questions and answer on Struts 2 just need to fill the form and send us we will send all the answers to them and it for both freshers and experienced condidate and also chat option is given in right hand side for directly chat with for answers


Top Struts interview questions and answers are below

Questions : 1 What’s MVC pattern ?
Answers : 1

The main purpose of using MVC pattern is to decouple the GUI from the Data. It also gives the ability to provide multiple views for the same Data. MVC pattern separates objects into three important sections:-

Model: - This section is specially for maintaining data. It is actually where your business logic, querying database, database connection etc. is actually implemented.
Views: - Displaying all or some portion of data, or probably different view of data. View is responsible for look and feel, Sorting, formatting etc.
Controller: - They are event handling section which affects either the model or the view. Controller responds to the mouse or keyboard input to command model and view to change. Controllers are associated with views. User interaction triggers the events to change the model, which in turn calls some methods of model to update its state to notify other registered views to refresh their display.

   
Questions : 2 Define struts?
Answers : 2

Struts are an open source framework for developing JAVA web applications. It extends Java Servlets API and helps developers to adopt MVC architecture. MVC pattern is good but developing the same can be real pain. Using struts it’s a breeze to implement MVC in projects. Struts provide a standard way of implementing MVC.

   
Questions : 3 Can you explain the directory structure for a struts folder in brief ?
Answers : 3

Below are the folders from point of view of root folder.
META-INF: - This directory has the Meta information.
WEB-INF/classes: - This location has the actual JAVA classes.
WEB-INF/classes/ApplicationResources.properties:- Contains text which application can
use. For instance error messages.
WEB-INF/lib/struts.jar:- Contains the Struts servlet, helper classes, taglib code etc.
WEB-INF/*.tld:- The Struts tag libraries.
WEB-INF/struts-config.xml:- A Struts configuration file.
WEB-INF/web.xml:- Configuration file for the servlet container
Index.jsp:- All JSP files come in the root directory as this one Index.jsp.

   
Questions : 4 Can you give an overview of how a struts application flows ?
Answers : 4

just to summarize how the execution flows in the struts application.
User makes browser makes a request to the Struts application that is processed by ActionServlet (Controller).
ActionServlet (Controller) populates the ActionForm (View) object with HTML JSP form data method.
ActionServlet (Controller) executes the Action object (Controller).
Action object uses the model and does the necessary execution and passes the control back to the ActionServlet
Action (Controller) forwards control to the JSP pages.
JSP pages use model data to generate a response to the browser.

   

Next Page 1 | Next Page 2 | Next Page 3

Ask your interview questions on Spring

Write Your comment or Questions if you want the answers on Spring from Spring Experts
Name* :
Email Id* :
Mob no* :
Question
Or
Comment* :
 





Disclimer: PCDS.CO.IN not responsible for any content, information, data or any feature of website. If you are using this website then its your own responsibility to understand the content of the website

--------- Tutorials ---