Replace the current fileset underneath the webdoclet task with the
following

--- SNIP ---
<fileset dir="${web.dir}/src"  includes="**/*Form.java"/>
<fileset dir="${web.dir}/src"  includes="**/*Action.java"/>
<fileset dir="${web.dir}/src" includes="**/*Servlet.java"/>
<fileset dir="${web.dir}/src" includes="**/*Filter.java"/>
<fileset dir="${web.dir}/src"  includes="**/*Tag.java"/>
-- END SNIP ---

Notice the directory '${web.dir}/src' is needed to point to the root of
your java source code

You will also need to add

--- SNIP ---
 * @struts.form
 *     name="groupForm"
--- END SNIP ---

to your form class.

This should fix your problems

Thanks,
James Hicks


-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
[EMAIL PROTECTED]
Sent: Friday, August 29, 2003 9:16 AM
To: [EMAIL PROTECTED]
Subject: [Xdoclet-user] webdoclet question


Hi all,

I'm trying to generate my web.xml and struts-config.xml using XDoclet 
tags.

In my build.xml I included the following ant-task:

<target name="xdoclet.web" depends="prepare">
 
        <taskdef 
                name="webdoclet" 
                classname="xdoclet.modules.web.WebDocletTask"
                classpathref="xdoclet.classpath"
        />
 
        <webdoclet 
                destdir="${build.dir}/WEB-INF" 
                mergedir="${xdoclet.merge.dir}/web"
        >
                <fileset dir="${web.dir}" includes="**/*Action.java"/>
 
                <deploymentdescriptor 
                        servletspec="${servlet.spec.version}"
                        distributable="false" 
                >
                <taglib
                        uri="struts-bean"
                  location="/WEB-INF/struts-bean.tld"
            />
        <taglib
                    uri="struts-html"
                    location="/WEB-INF/struts-html.tld"
            />
        <taglib
                    uri="struts-logic"
                    location="/WEB-INF/struts-logic.tld"
            />
        <taglib
                    uri="struts-nested"
                    location="/WEB-INF/struts-nested.tld"
            />
        <taglib
                    uri="struts-tiles"
                    location="/WEB-INF/struts-tiles.tld"
            />
 
            </deploymentdescriptor>
 
            <strutsconfigxml/>
 
        </webdoclet>
</target>

${web.dir} contains the following directories:

+ web.dir
|\_ WEB-INF
|\_ css
|\_ jsp
 \_ src

The src folder contains the following package:

nl.xbase.struts.action

which holds 2 files:

GroupAction.java
GroupForm.java

In GroupAction.java I added the following xdoclet comments:

* @struts.action
 *              name="groupForm"
 *              path="/group"
 *              scope="request"
 *              validate="false"
 * @struts.action-forward
 *              name="success"
 *              path="group.jsp"

Now when I run the ant task my struts-config.xml & web.xml get
generated, 
but they remain empty. There is no reference what so ever to my 
GroupAction and GroupForm.

What am I doing wrong here?

Many thanks,

Harm de Laat
Informatiefabriek
The Netherlands



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf _______________________________________________
xdoclet-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-user



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
xdoclet-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-user

Reply via email to