Advantages Of Struts MVC Framework
Struts follow MVC framework. So the JSP, Java and Action classes are organized and easily maintainable. Struts offer many advantages to the application programmer while reducing the development time and making the manageability of the application easier.
Advantages of Struts:
Centralized Configuration :
Rather than hard coding information into java programs,many Struts values are represented in XML or property files. Struts_config.xml file is the place from where you can get all information about your web application. This is organized. Your Action class , Form bean and JSP page information is in Struts_config.xml so don't need to search . All info in one place.
Don't need to set the form vales to your value object . When you want to capture data from a form ( In the servlet you do request.getParameter()).
In the struts you don't need to do explicitly request.getParameter(). Struts request processor will do for you. All the input data will be set to form bean.
Bean Tags :
Struts provides a set of custom JSP tags (bean:write,in particular) that let you easily output the properties of JavaBeans components.
Basically,these are concise and powerful variations of the standard jsp:useBean and jsp:getProperty tags.
HTML tags :
Struts provides a set of custom JSP tags to create HTML forms that are associated with JavaBeans components.
Form Field Validation :