Advance Struts Action
Posted on: May 20, 2011 at 12:00 AM
In this tutorial you will learn about the standard feature of struts2 framework.

Advance Struts2 Action

In struts framework Action is responsible for controlling the request coming from the clients. It is a java class class it can be a POJO also. The struts2 framework provides some classes and interfaces for writing action classes that provides a lots of flexibility. The most common which is extended by most of the Action classes is ActionSupport class.

The default method which in an action class is execute() methods. When the action is called this method executed automatically.

The action class in Struts2 framework is said to be advance which reduces the complexity of code, that implements the model driven interface, uses validation interceptor for validation of field and action. For the good Action in Struts2 framework writing an action is not only important. The action class must be mapped well in struts.xml file. The Struts2 framework reduces the complexity using this xml file. This decides whether the results can be forwarded, dispatched, or simply forwarded to which page/resources.

The full feature of Struts2 framework can be obtained from its mapping. The framework provides some advance features such as creating a package, calling and declaring an interceptor, forwarding action to another action, this can be done in struts.xml file. The framework also provides some different types of result types such as header, stream, chain, xslt, plaintext, tiles, redirectAction, dispatcher etc. Therefore it is very important that you should map the action classes very. carefully.

Related Tags for Advance Struts Action:



Advertisement null