The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

I think I found the problem & solution looking at

I had placed the xdoclet libraries in my ANT_HOME/lib folder (my mistake) in desparation trying to get the documentDoclet to work. Since it could not find servlet.jar in the SAME classpath, it was not happy.

I had tried placing servlet.jar in ANT_HOME/lib as well, and that fixed the problem. But I was not at all happy with that solution.

By cleaning out my ANT_HOME/lib folder, it is now deferring to the classpath I specify to find all the xdoclet jars, AND the servlet.jar.

Boy! That's a strange quirk with Ant/java class loader!
Just to try, I downloaded the previous version of xdoclet (1.2.1). Once I had set up to use that library instead, it came back with the same error about not seeing javax.servlet.Servlet.
I am having great difficulty getting the webdoclet task to work. I went back and tried implementing the info task (@todo tags), and that seems to work fine. But when I attempt the webdoclet task it complains about not finding javax.servlet.Servlet in the classpath.

I have the following from my build file:

<path id="xdoclet.lib.path">
<pathelement location="${servlet.jar}"/>
<fileset dir="${xdoclet.lib.dir}" includes="*.jar"/>


<taskdef name="webdoclet" >

and I even tried echoing ${servlet.jar} to confirm that IS pointing to the correct place. (I trust the xdoclet.lib.path property, since it works fine for the documentDoclet/info task)

I did notice on xdoclet-1.2.2's documentation for webdoclet, that it requires SUN'S Servlet.class - would that be any different from the servlet.jar that comes with Tomcat 4.1.X?

I also know from experience that even if it points to "javax.servlet.Servlet", that it may in fact be a different library that's giving me problems. But that's not really helping, because I still have no idea what I'm doing wrong.

Any suggestions would be very helpful. I would really like to start having my TLDs autogenerated with xdoclet if I can!