Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Struts Struts2 Struts 2 zero configuration,Struts 2 zero configuration Example

Related Tutorials


 
 

Share on Google+Share on Google+

Struts 2 zero configuration,Struts 2 zero configuration Example

Advertisement
This page discusses - Struts 2 zero configuration,Struts 2 zero configuration Example

Struts 2 Zero Configuration

This section discusses Struts 2 zero configuration feature with example. The Struts 2 zero configuration is another very interesting and attractive feature to make development much easier.

Any "Zero Configuration" Struts 2 application uses annotations to register the actions. There is no need to write xml configuration or property files. In order to configure the actions we have to just specify the packages and Struts 2 will read the classes, create actions based on the class name and then register it with the system.

Steps to Configure and use Zero Configuration

  1. Enable zero configuration
  2.  

You simply specify a path to your action packages and Struts will read the classes, create actions based on the class name and register it with XWork. Once you combine this with the annotation support for action classes which enables you to define results and namespaces, the struts.xml (or should I say xwork.xml) goes out the window.

Advertisement

If you enjoyed this post then why not add us on Google+? Add us to your Circles



Liked it!  Share this Tutorial


Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.

Posted on: April 18, 2011

Related Tutorials

Discuss: Struts 2 zero configuration,Struts 2 zero configuration Example  

Post your Comment


Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
 
 
Comments:0
DMCA.com