Struts, Spring, Tapestry, oh my!

Bryan Sant bryan.sant at gmail.com
Wed Aug 10 15:14:49 MDT 2005


On 8/10/05, Grant Shipley <gshipley at gmail.com> wrote:
> On 8/10/05, Dennis <devel at muhlesteins.com> wrote:
> > Dennis wrote:
> > To be fair, some of that was in articles, support, other resources,
> > etc.  Also, the project uses Hibernate and that has it's own fair share
> > of xml.  There are still 3 or 4 thousand lines of Struts/Tiles xml though.
> 
> But hopefully you are using an editor/ide that will create these for you?

Just use XDoclet to generate your struts config.  You never need to
mess with the XML (unless you want to).  Your Struts action class
would look like this:

/**
 * Constructs the view relationships page.
 * 
 * @struts.action name="ParentChildRelationshipsAction"
 *    path="/parentchildrelationships"
 *    scope="request"
 *    input=""
 *    validate="false"
 *    parameter=""
 * @struts.action-forward name="Success"
 *    path="/xmlcview"
 */
public class ParentChildRelationshipsViewAction extends Action {
  // Class implementation goes here.
}

The XDoclet pre-processor will turn the @ tags in the Javadoc comments
into the struts-config.xml file.  There are many IDE plug-ins that can
also assist.

-Bryan



More information about the PLUG mailing list