Magazine
 

Struts2

 
6 Improved results - Unlike ActionForwards, Struts 2 Results provides flexibility to create multiple type of outputs and in actual it helps to prepare the response.

7 Better Tag features - Struts 2 tags enables to add style sheet-driven markup capabilities, so that we can create consistent pages with less code. Struts 2 tags are more capable and result oriented. Struts 2-tag markup can be altered by changing an underlying stylesheet. Individual tag markup can be changed by editing a FreeMarker template. Both JSP and FreeMarker tags are fully supported.

8 Annotations introduced: Applications in struts 2 can use use Java 5 annotations as an alternative to XML and Java properties configuration. Annotations minimize the use of xml.

9 Stateful Checkboxes - Struts 2 checkboxes do not require special handling for false values.

10 QuickStart - Many changes can be made on the fly without restarting a web container.

11 Customizing controller - Struts 1 lets to customize the request processor per module, Struts 2 lets to customize the request handling per action, if desired.

12 Easy Spring integration - Struts 2 Actions are Spring-aware. Just needs to add Spring beans.

13 Easy plugins - Struts 2 extensions can be added by dropping in a JAR. No manual configuration required.

14 AJAX support - The AJAX theme gives interactive applications a significant boost.

The framework provides a set of tags to help you ajaxify your applications, even on Dojo.


  The AJAX features include:
• AJAX Client Side Validation
• Remote form submission support (works with the submit tag as well)
• An advanced div template that provides dynamic reloading of partial HTML
• An advanced a template that provides the ability to load and evaluate JavaScript remotely
• An AJAX-only tabbed Panel implementation
• A rich pub-sub event model
• Interactive auto complete tag
• Request Lifecycle in Struts 2 applications 

Request for a resource by the user is processed in the sequence given below:

1 User Sends request: User sends a request to the server for some resource.

2 FilterDispatcher determines the appropriate action: The FilterDispatcher looks at the request and then determines the appropriate Action.

3 Interceptors are applied: Interceptors configured for applying the common functionalities such as workflow, validation, file upload etc. are automatically applied to the request.

4 Execution of Action: Then the action method is executed to perform the database related operations like storing or retrieving the data from database. 

5 Output rendering: Then the Result renders the output.

6 Return of Request: Then the request returns through the interceptors in the reverse order. The returning request allows us to perform the clean-up or additional processing.

7 Display the result to user: Finally the control is returned to the servlet container, which sends the output to the
user browser.
Nov 2007 | Java Jazz Up |30
 
previous
index
next
 
View All Topics
All Pages of this Issue
Pages: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29,

30
, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53 , 54, 55, 56, 57,

58
, 59, 60, 61, 62, 63 , 64, 65 , 66 , 67 , 68 , 69   Download PDF