Struts, Spring, Tapestry, oh my!

Dennis devel at
Wed Aug 10 15:24:12 MDT 2005

Bryan Sant wrote:

>On 8/10/05, Grant Shipley <gshipley at> wrote:
>>On 8/10/05, Dennis <devel at> 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.
I've used xdoclet for hibernate and tried it with Struts.  The
application used a lot of things that xdoclet didn't support.  Perhaps
that has changed since I wrote it.  The point I was trying to make is
that some frameworks don't have to mess with as much xml.   Even if you
use xdoclet, you still have to understand the xml, and then you have to
understand xdoclet, then you have an additional layer of debugging to
find out what is wrong if something doesn't work.

On a side note, I'm not of the crowd, but there is a crowd that will
argue that xdoclet is of the devil :) :) and causes more pain than it's


More information about the PLUG mailing list