Struts and the MVC Architecture Step 8
To start using Struts, you have to understand its Framework. Struts uses the MVC architecture. MVC stands for Model, View and Controller. The "View" are the JSP pages that the user will see on their browser. The "Model" is the business logic that interacts with the database. The "Controller" determines the overall flow of the application.
The way struts will work is the user will interact with the JSP pages on their browser. The JSP pages uses a form which is attached to a Java Bean. A Java Bean is a standard Java class that usually consists of getters and setters to interact with the JSP pages. The user will perform an action which will call a struts Action class. The action class will perform a function, possibly perform some business logic and possibly will interact with the database. The action class will then forward the user to a specific location using an Action Forward. The Action Forwards are located in the struts.xml file. Tomcat will convert the JSP pages to html and send the html back to the browser.

0 comments:
Post a Comment