Interview Question: How is the MVC design pattern used in Struts framework?

By: Ash Printer Friendly Format    

Question:How is the MVC design pattern used in Struts framework?

Answer: In the MVC design pattern, application flow is mediated by a central Controller. The Controller delegates requests to an appropriate handler. The handlers are tied to a Model, and each handler acts as an adapter between the request and the Model. The Model represents, or encapsulates, an application's business logic or state. Control is usually then forwarded back through the Controller to the appropriate View. The forwarding can be determined by consulting a set of mappings, usually loaded from a database or configuration file. This provides a loose coupling between the View and Model, which can make an application significantly easier to create and maintain.

Controller--Servlet controller which supplied by Struts itself; View --- what you can see on the screen, a JSP page and presentation components; Model --- System state and a business logic JavaBeans.

 

 

 

 



Most Viewed Articles (in Interview )

Question: What is a Hidden Comment in JSP?

Interview Question: How do I install Struts?

Differentiate between .ear, .jar and .war files.

Name the containers which uses Border Layout as their default layout?

What is similarities/difference between an Abstract class and Interface?

Interview Question: What is Struts?

Interview Question: Is Struts compatible with other Java technologies?

Interview Question: Where can I get a copy of Struts?

Interview Question: Why aren't the Struts tags maintained as part of the Jakarta Taglibs project ?

Interview Question: What about JSTL and JavaServer Faces ?

Interview Question: Can i map more than one table in a CMP?

Interview Question: What is the difference between EAR, JAR and WAR file?

Interview Question: What is the difference between find and select methods in EJB?

Interview Question: What is the difference between Message Driven Beans and Stateless Session beans?

Question: Explain the life-cycle methods in JSP?

Latest Articles (in Interview)

Comment on this tutorial