Struts and Enterprise Web Technologies
暂无分享,去创建一个
This chapter is based on Struts 1.1. The necessary technologies to start using the Struts framework include JSP, Servlets, custom tag libraries, and XML. The role of the web application server is given importance when using Struts applications.. Struts is a Java-based framework based on the MVC design pattern and is used to build web applications. It's not a technology unto itself. While this chapter is not code intensive, it is critical to engender an understanding of how all the technologies involved are used and what their purpose is. The core Struts technologies are JavaServer Pages and Servlets. The Struts framework is design pattern-oriented. Not only do patterns provide clean, proven designs, they also help the developer's learning curve. There is no presentation logic in the model and business layers in MVC pattern. This improves component reuse there and improves the ability to change a layer's implementations with minimal effect on the other layers. This is a key point and one of the main benefits of Struts. In the Struts framework, the handlers are also called actions. The handlers are tied to a Model, and each handler acts as an adapter, or bridge, between the request and the Model. Struts makes use of JavaBeans within its framework, so it's important to at least be familiar with the terminology. Struts has five powerful custom tag libraries that are used for building interactive and form-based web applications. It is difficult to build an application, these days, without having to work with XML. These files are commonly used as configuration files for various applications, and Struts is no exception. The two most significant XML files in the Struts framework are web.xml and struts-eonfig.xml. Struts applications can be run in any JSP 1.1 and Servlet 2.2 compliant container.