Sorry about that... I was playing around with getting it working so I hadn't comitted anything and must have refreshed my sandbox.
Here, We'll use the classes for City Codes... ----- snippet of EJB ----- package com.x.y.z.ejb; // imports /** * @ejb.bean * name="CityCodes" * description="City Codes Bean" * jndi-name="CityCodes" * view-type="both" * type="BMP" * primkey-field="id" * @ejb.pk * class="java.lang.Integer" * generate="false" * * @ejb.transaction type="Supports" * @ejb.home remote-class="com.pbms.rtc.neXus.ejb.CityCodesHome" * @ejb.interface remote-class="com.pbms.rtc.neXus.ejb.CityCodes" * * @struts.form include-all="true" * * @jboss.container-configuration name="Standard BMP EntityBean" */ public class CityCodesBean implements EntityBean { // Standard EJB Methods (omitted) // getter w/ struts tagging /** * @ejb.interface-method * @struts.validator type = "required" * */ public String getCode() { return code; } } ----- snippet of EJB ----- ----- snippet of generated form ----- package com.x.y.z.form; /** * Generated by XDoclet/ejbdoclet/strutsform. This class can be further processed with XDoclet/webdoclet/strutsconfigxml. * * @struts.form name="cityCodesForm" */ public class CityCodesForm extends org.apache.struts.action.ActionForm implements java.io.Serializable { protected String code; // others /** Default empty constructor. */ public CityCodesForm() {} public String getCode() { return this.code; } /** * @struts.validator type="required" */ public void setCode( String code ) { this.code = code; } } ----- snippet of generated form ----- Now when I run the 'strutsvalidationxml' sub-task of 'webdoclet', I get the following error message... ----- snippet of error message ----- [webdoclet] (TemplateSubTask.engineStarted 794 ) Generating output 'validation.xml' using template file 'jar:file:C:\opt\eWorkspace\PROJECT\lib\XDoclet-v1.2.1\xdoclet-apache-module-1.2.1.jar!/xdoclet/modules/apache/struts/resources/validation_xml.xdt'. [webdoclet] org.xml.sax.SAXParseException: Element "formset" requires additional elements. .... .... ----- snippet of error message ----- and the resulting validation.xml file is as follows... ----- snippet of validation.xml file ----- <?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE form-validation PUBLIC "-//Apache Software Foundation//DTD Commons Validator Rules Configuration 1.0//EN" "http://jakarta.apache.org/commons/dtds/validator_1_0.dtd"> <form-validation> <!-- Define global validation config in validation-global.xml --> <formset> </formset> </form-validation> ----- snippet of validation.xml file ----- I know that the error is caused by the fact that there is no elements defined under the <formset> element, but these should be filled in by the 'strutsvalidationxml' subtask defined in my build.xml file, which is as follows.... ----- snippet of build.xml ----- <target name="webdoclet" depends="init,ejbdoclet" > <webdoclet force="true" destdir="${gen.etc.home}" mergedir="${meta-data.home}"> <fileset dir="${src.home}"> <!-- standard source files --> <include name="**/*Form.java" /> <include name="**/*Action.java" /> <include name="**/Log4jInit.java" /> </fileset> <fileset dir="${gen.src.home}"> <!-- xdoclet-generated source files --> <include name="**/form/*Form.java" /> </fileset> <!-- build the deployment descriptor --> <deploymentdescriptor ... /> <!-- generate the jboss-web.xml deployment descriptor --> <jbosswebxml version="3.2" ... /> <!-- build the Struts Config file --> <strutsconfigxml version="1.1" ... /> <!-- build the Struts Validation file --> <strutsvalidationxml destDir="${gen.etc.home}/WEB-INF/conf" validateXML="true" /> </webdoclet> </target> ----- snippet of build.xml ----- Any ideas what I'm doing wrong? The fileset's work for all the other sub-tasks without issue, so I'm assuming that they are correct (but they could be wrong). Thanks for the help. -={ Kyle }=- --- Matt Raible <[EMAIL PROTECTED]> wrote: > What's your EJB look like? Are the @struts.validator tags on your > getters? The generated form below doesn't contain any > @struts.validator tags, leading me to believe that 1) no validation > tags are in your EJB or 2) you aren't using the new template from > CVS. > > Matt > > On Sep 8, 2004, at 10:58 AM, Kyle Korndoerfer wrote: > > > Sorry for the delay, but with the holiday weekend and all, things > got > > busy. > > > > Here is the core of one of my Struts Form, generated from the EJB > using > > the updated struts_form.xdt that you upadted a month or so ago in > > response to an earlier inquiry regarding the 'copying' of struts > > validation tags from the EJB into the generated form to be later > > processed by the webdoclet strutsvalidationxml sub-task. > > > > ----- snippet ----- > > package com.x.y.z.form; > > > > > > import javax.servlet.http.HttpServletRequest; > > import org.apache.struts.action.ActionForm; > > import org.apache.struts.action.ActionMapping; > > > > > > /** > > * @struts.form name="loginForm" > > */ > > public class LoginForm > > extends ActionForm > > { > > /** String for holding the username */ > > private String userName = null; > > /** String for holding the password */ > > private String password = null; > > /** String for holding the session challenge */ > > private String challenge = null; > > > > > > /** Sets the username > > * > > * @param userName The username to set > > */ > > public void setUserName( String userName ) > > { > > this.userName = userName; > > }// setUserName( userName ) > > > > /** Returns the username > > * > > * @return The provided username > > */ > > public String getUserName () > > { > > return userName; > > }// getUserName() > > > > > > /** Sets the password > > * > > * @param password The password provided > > */ > > public void setPassword( String password ) > > { > > this.password = password; > > }// setPassword( password ) > > > > /** Returns the password > > * > > * @return The provided password > > */ > > public String getPassword() > > { > > return password; > > }// getPassword() > > > > > > /** Sets the session challenge string > > * > > * @param challenge The session challenge string. > > */ > > public void setChallenge( String challenge ) > > { > > this.challenge = challenge; > > }// setChallenge( challenge ) > > > > /** Returns the session challenge > > * > > * @return The session challenge > > */ > > public String getChallenge() > > { > > return challenge; > > }// getChallenge() > > > > > > /** Resets the login form to default values (or blank) > > * > > * @param mapping Mapping used to select this instance > > * @param request Servlet request we are processing > > */ > > public void reset( ActionMapping mapping, HttpServletRequest > > request ) > > { > > this.userName = null; > > this.password = null; > > }// reset( mapping, request ) > > > > } > > ----- snippet ----- > > > > Thanks for any help you can give (again) > > > > -={ Kyle }=- > > > > --- Matt Raible <[EMAIL PROTECTED]> wrote: > > > >> Can you post the source of your ActionForm? > >> > >> Matt > >> > >> On Sep 2, 2004, at 1:48 PM, Kyle Korndoerfer wrote: > >> > >>> XDoclet v1.2.1 > >>> Ant v1.6.1 > >>> > >>> I'm trying to use the strutsvalidationxml subtask of webdoclet to > >>> qutomatically generate the validation.xml file for my forms (some > >> are > >>> auto-generated from my EJB's, other a written by hand), but when > >> the > >>> task executes, I get the following error... > >>> > >>> ... > >>> [webdoclet] org.xml.sax.SAXParseException: Element "formset" > >> requires > >>> additional elements. > >>> ... > >>> > >>> When I look into the generated validation.xml file, it is > >> essentially > >>> blank... > >>> > >>> --- VALIDATION.XML > >>> <?xml version="1.0" encoding="UTF-8" ?> > >>> <!DOCTYPE form-validation PUBLIC "-//Apache Software > >> Foundation//DTD > >>> Commons Validator Rules Configuration 1.0//EN" > >>> "http://jakarta.apache.org/commons/dtds/validator_1_0.dtd"> > >>> > >>> <form-validation> > >>> <!-- > >>> Define global validation config in validation-global.xml > >>> --> > >>> <formset> > >>> </formset> > >>> </form-validation> > >>> -- VALIDATION.XML > >>> > >>> So, it looks like the strutsvalidationxml tag is not processing, > or > >> for > >>> some reason finding, my Form classes. > >>> > >>> Here is a snippet from my build.xml just in case there is a > problem > >>> there... > >>> > >>> --- BUILD.XML > >>> <webdoclet force="true" > >>> destdir="${gen.etc.home}" > >>> mergedir="${meta-data.home}"> > >>> > >>> <fileset dir="${src.home}"> > >>> <!-- standard source files --> > >>> <include name="**/*Form.java" /> > >>> <include name="**/*Action.java" /> > >>> <include name="**/Log4jInit.java" /> > >>> </fileset> > >>> <fileset dir="${gen.src.home}"> > >>> <!-- xdoclet-generated source files --> > >>> <include name="**/form/*Form.java" /> > >>> </fileset> > >>> > >>> <deploymentdescriptor ... /> > >>> > >>> <jbosswebxml ... /> > >>> > >>> <strutsconfigxml ... /> > >>> > >>> <strutsvalidationxml > >>> destDir="${gen.etc.home}/WEB-INF/conf" > >>> validateXML="true" /> > >>> </webdoclet> > >>> --- BUILD.XML > >>> > === message truncated === __________________________________ Do you Yahoo!? Read only the mail you want - Yahoo! Mail SpamGuard. http://promotions.yahoo.com/new_mail ------------------------------------------------------- This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170 Project Admins to receive an Apple iPod Mini FREE for your judgement on who ports your project to Linux PPC the best. Sponsored by IBM. Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php _______________________________________________ xdoclet-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/xdoclet-user