Yes, that's because XDoclet has to know that ValidatorForm is an
ActionForm. It can't do that without struts.jar, because that's where the
information about ValidatorForm extends ActionForm is.
Anders
* Timothy Stewart ([EMAIL PROTECTED]) wrote:
> Figured out my own problem. It seems that you have to have the struts.jar
> and commons-validator.jar in the class path for the WebDocletTask else it
> can't generate the form entry.
>
> Happy Diwali
>
> Timmy
>
> -----Original Message-----
> From: Timothy Stewart
> Sent: Thursday, October 23, 2003 2:07 PM
> To: [EMAIL PROTECTED]
> Subject: Struts and Xdoclet
>
>
> Anyone using struts with xdoclet.
>
> I have the following form bean
>
> import org.apache.struts.validator.ValidatorForm;
>
> /**
> * @struts.form name="LoginForm"
> */
> public class LoginForm extends ValidatorForm
> {
> private String _userName;
> public LoginForm()
> {
> super();
> }
>
> public String getUserName()
> {
> return _userName;
> }
>
> /**
> *
> * @struts.validator type="required" msgkey="password.required"
> */
> public void setUserName(String string)
> {
> _userName = string;
> }
> }
>
> and I am using xdoclet task as such
>
> <target name="strutsdoclet" description="Generates all the struts doclet
> stuff">
> <taskdef name="webdoclet"
> classname="xdoclet.modules.web.WebDocletTask">
> <classpath>
> <path refid="build.path"/>
> </classpath>
> </taskdef>
>
> <webdoclet destdir="WEB-INF"
> force="${xdoclet.force}"
> mergedir="merge">
> <fileset dir="source"/>
>
> <deploymentdescriptor validatexml="true"
> distributable="false"
> displayname="${app.name}"
> mergedir="merge">
> <welcomefile file="login.jsp"/>
>
> </deploymentdescriptor>
>
> <strutsconfigxml validatexml="true"
> version="1.1"
> mergedir="merge"/>
>
> <strutsvalidationxml/>
> </webdoclet>
> </target>
>
> Running this task generates some information to the validation.xml and the
> struts-config.xml.
>
> but it doesn't put the formbean element for this form into the form-beans
> section.
> <!-- ========== Form Bean Definitions ===================================
> -->
> <form-beans>
>
> </form-beans>
>
> What am I doing wrong????
>
> Thanks,
> Timmy
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]