On Wed, 2003-03-05 at 14:35, Dave Steinbrunn wrote:
> I'm trying to use the webdoclet task to generate my war and some jsp  
> taglibs.  When I run my ant task to do this, I get the following error:
> 
> neutron--> ant -buildfile build2.xml
> Buildfile: build2.xml
> 
> war:
> [webdoclet] Make sure the jar file containing the webdoclet class is on  
> the classpath specified in the <taskdef> that defined {2}. These  
> classes are needed in order to generate correct output.
> [webdoclet]     at xdoclet.DocletTask.checkClass(DocletTask.java:501)

The "{2}" is a bug, fixed in the next version.  The message should
actually read "Make sure the jar file containing the
javax.servlet.Servlet class is on the classpath specified in the
<taskdef> that defined webdoclet."  I suspect you've now realised what
the problem is, however...

> I am running Mac OSX 10.2.4 with java 1.4.1 DP10.  I have  
> xdoclet-1.2.b2 installed at /usr/local/xdoclet-1.2b2/lib.  The java  
> DP10 is stored in the normal place  
> (/System/Library/Frameworks/JavaVM.framework/Versions/1.4.1/), although  
> I created a symlink at /usr/local/java to point to that to save myself  
> some typing.  I refer to the symlink in my JAVA_HOME env variable.
...
>     <path id="xdoclet.class.path">
>        <fileset dir="/usr/local/xdoclet-1.2b2/lib">
>           <include name="*.jar"/>
>        </fileset>
>     </path>
...
>        <taskdef name="webdoclet"
>                 classname="xdoclet.modules.web.WebDocletTask"
>                 classpathref="xdoclet.class.path"
>        />

Okay, you've told us where the JDK's installed, but what about the
servlet API classes?  Have you installed the J2EE reference
implementation and/or included your app server's client classes in the
classpath?  If you've installed the binary distribution in
/usr/local/xdoclet-1.2b2/lib, I'm guessing you've just put the various
module jars there.  if you look in our samples/lib dir, you'll also see 
servlet.jar, jboss-j2ee.jar, etc. - that's because some modules also
need 'their' jars (or at least the J2EE classes) in the classpath.  The
samples' build file includes these in the classpath too; so should you.


Andrew.




-------------------------------------------------------
This SF.net email is sponsored by: Etnus, makers of TotalView, The debugger 
for complex code. Debugging C/C++ programs can leave you feeling lost and 
disoriented. TotalView can help you find your way. Available on major UNIX 
and Linux platforms. Try it free. www.etnus.com
_______________________________________________
xdoclet-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-user

Reply via email to