Posted by: DOCSERVE | August 8, 2013

Struts Web Application Framework

When you use Struts, the framework provides you with a controller servlet, ActionServlet, which is defined in the Struts libraries that are included in the IDE, and which is automatically registered in the web.xml deployment descriptor as shown below. The controller servlet uses a struts-config.xml file to map incoming requests to Struts Action objects, and instantiate any ActionForm objects associated with the action to temporarily store form data. The Action object processes requests using its execute method, while making use of any data stored in the form bean. Once the Action object processes a request, it stores any new data (i.e., in the form bean, or in a separate result bean), and forwards the results to the appropriate view.

Struts workflow

Developing a Struts application is similar to developing any other kind of web application in NetBeans IDE. However, you complement your web development toolkit by taking advantage of the Struts support provided by the IDE. For example, you use templates in the IDE to create Struts Action objects and ActionForm beans. Upon creation, the IDE automatically registers these classes in the struts-config.xml file and lets you extend this file very easily using menu items in the Source Editor‘s right-click menu. Because many web applications use JSP pages for the view, Struts also provides custom tag libraries which facilitate interaction with HTML forms. Within the IDE’s Source Editor, you can invoke code completion and Javadoc support that helps you to work efficiently with these libraries.

Struts Framework(pdf)



Get every new post delivered to your Inbox.

Join 123 other followers

%d bloggers like this: