Programming Tutorials

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

By: Ash in Interview Tutorials on 2008-08-13  

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.

 

 

 

 





Add Comment

* Required information
1000

Comments

No comments yet. Be the first!

Most Viewed Articles (in Interview )

What is JSP Scriptlet?

Interview Question: Is it possible to share an HttpSession between a JSP and EJB? What happens when I change a value in the HttpSession from inside an EJB?

Interview Question: Is there a particularly good IDE to use with Struts ?

Tell me something about J2EE component?

What are implicit Objects available to the JSP Page?

Interview Question: How does Struts work?

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

What is the difference between interface and abstract class?

Explain the user defined Exceptions?

Interview Question: Do you have to credit Struts on your own website?

The output of System.out.println(5>>2) in Java

Types of Interviews

Explain garbage collection?

Question: What is a Hidden Comment in JSP?

Interview Question: Why are some of the class and element names counter-intuitive?

Latest Articles (in Interview)