By: Kamini Emailed: 1728 times Printed: 2329 times
classes using special XDoclet tags as follows:
* @struts.action name="custForm" path="/editCustomer"
* scope="request" validate="false"
* parameter="action" input="mainpage"
* @struts.action-forward name="showCustForm"
The above tags generate the Struts action mapping as follows in the strutsconfig.xml at build time.
XDoclet is project on sourceforge that started off with
auto-generating home interface, remote interface, ejb-jar.xml from special
tags in the EJB implementation class. It was a good idea with EJBs since the EJB
implementation class would drive everything else - home, remote
and the ejbjar.
With struts-config.xml, none of the individual classes drive the flow in entirety. Everything works always in relation to another. You always want to track what is going on, how various pieces interact together and how the flow works. You always want to see which action takes you where and get the whole big picture as you develop. Hence the struts-config.xml serves much like whiteboarding - visualizing whats going on in its entirety. Providing this information via piecemeal approach in different files using XDoclet tags defeats the purpose. Providing this information via piecemeal approach in different files using XDoclet tags defeats the purpose. Hence our advice is not to use the XDoclet approach for auto-generating struts-config.xml.
Be the first one to add a comment
Most Viewed Articles (in Struts )
Most Emailed Articles (in Struts)