QuickStudy: Struts

30.05.2006

Developing for the Web

Since Struts was developed for building Web applications, it has to handle the "stateless" connection between the client and server, in which the server disconnects as soon as a Web page is presented to the user's browser. Thus, if the user modifies the page (for example, by filling in a form or entering data), the server is unaware of the changes until the browser queries the server again.

Struts deals with this by implementing the model-view-controller, or MVC, design approach. Here, the user interface is decoupled from the data and business logic:

-- Model contains the core of the application's functionality and/or encapsulates the application's state. It doesn't need to know anything about the view or controller.

-- View is the look of the application to the user. The view knows nothing about the controller but can access (though not change) the model. View is implemented with no flow logic, no business logic and no model information -- just JavaServer Pages, HTML pages, style sheets, JavaScript files, Resource bundles, Java beans and JSP tags.