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

By: Guru Singh  

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

Answer:  In the MVC design pattern, a central Controller mediates application flow. 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.

 

 

 

 


Archived Comments


Most Viewed Articles (in Interview )

How to define an Interface?

Question: What is a Hidden Comment in JSP?

What is the difference between jsp:include page and @ include file?

Interview Question: What are the call back methods in Entity bean?

Interview Question: What is Message Driven Bean?

Is Iterator a Class or Interface? What is its use?

Interview Question: What is the difference between JavaBean and EJB?

What is difference between Java Bean and Enterprise Java Bean?

Interview Question: Does Struts include its own unit tests?

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

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

Question: What is the directory structure of a web application?

What is the difference between jsp:forward and response.sendRedirect(url),?.

What types of comments are available in the JSP?

Interview Question: Why does EJB needs two interfaces(Home and Remote Interface)?

Latest Articles (in Interview)

Comment on this tutorial