This week's book giveaway is in the Performance forum.
We're giving away four copies of The Java Performance Companion and have Charlie Hunt, Monica Beckwith, Poonam Parhar, & Bengt Rutisson on-line!
See this thread for details.
Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Struts Project and XDoclet

 
Alec Lee
Ranch Hand
Posts: 569
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 456
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 4968
1
Hibernate Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 569
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Brent Sterling
Ranch Hand
Posts: 948
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic