wood burning stoves*
The moose likes Struts and the fly likes Struts Project and XDoclet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts Project and XDoclet" Watch "Struts Project and XDoclet" New topic
Author

Struts Project and XDoclet

Alec Lee
Ranch Hand

Joined: Jan 28, 2004
Posts: 569
Just want to survey how many people feel that Xdoclet is a must for Struts project. I feel that it is very important since I can keep everything in just 1 single source file rather than maintaining information spreaded across ActionForm, struts-config.xml and manually making sure they are in sync. But it seems that not many people post questions relating to Xdoclet so I guess it isn't widely used. Just want to hear the opinion from other people.
Jan Groth
Ranch Hand

Joined: Feb 03, 2004
Posts: 456
well, xdoclet will crash if you use java 5. furthermore you will only be able to configure one mapping per action class, which strongly handicaps your flexibility.

xdoclet2 seems rather undocumented and un-maintained.

check this thread

i had to kick it out of the project, which i dont regret very much, special as i discovered how much better declarative validation works with multiple mappings per class file...

hope it helps,
jan
Cameron Wallace McKenzie
author and cow tipper
Saloon Keeper

Joined: Aug 26, 2006
Posts: 4968
    
    1

WOW!

I love XDoclet, although the applications I used it on weren't the most complex in the world. After using it the first time, I felt I'd never do another project without it. I guess I should have said "never without something like XDoclet." I never hit any of those roadblocks myself.

I'd definitely say that using an XDoclet type of technology is a must. But I guess there's always value in looking at similar alternatives.

-Cameron McKenzie
Alec Lee
Ranch Hand

Joined: Jan 28, 2004
Posts: 569
Hi Kameron,

I used Xdoclet for EJB, too. But does Struts project also need Xdoclet? I heard that some people don't like it for Struts.

Thanks
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
The main reason I don't use Xdoclet in my Struts applications is that I have other Struts tools that handle the creation of entries in my struts-config.xml file.

I use IBM's Rational Application Developer which has a nifty tool that lets me draw diagrams connecting web pages, Action classes and ActionForms and then creates entries in struts-config.xml file from those diagrams. I almost never touch the actual XML.


Merrill
Consultant, Sima Solutions
Brent Sterling
Ranch Hand

Joined: Feb 08, 2006
Posts: 948
I have to vote that it is not a must since I do not use it. Maybe I am missing out on something. Do you use XDoclet to generate anything other than your struts-config.xml (like tiles-defs.xml or validation.xml)? Do you put XDoclet tags in both your Action and ActionForm classes? I often have several action mappings that use the same action class but have different parameter and validation attributes and maybe a different set of forwards. Can you do this with XDoclet?

Anybody have some sample Struts XDoclet examples they want to share?

- Brent
 
jQuery in Action, 2nd edition
 
subject: Struts Project and XDoclet
 
Similar Threads
XDoclet 1.2 vs XDoclet 2
To authors
XDoclet Customization
xdoclet and java 5 (and struts ;-) )
EJB 2.0 and Xdcolet problems!