[ http://jira.codehaus.org/browse/XDP-237?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=157071#action_157071 ]
ravishankar commented on XDP-237: --------------------------------- As per your suggestion I have done the following changes in my code but it is not *working* *The xwork.xml is not getting generated.* Please let me know the following. 1. If I want to generate *struts.xml* file in struts 2 how to do it and which plugin to use? 2. I have added all the jar file details which i am using.Can you pls let me know if I am *missing* anything. I have done the following /** @xwork.action package="edit" name="struts2Action" @xwork.result type="redirect" name="success" value="/edit/files/index.vm" @xwork.result type="velocity" name="error" value="/edit/error.vm" */ @Validation @Result(name="SUCCESS",value="/success.jsp") public class struts2Action extends ActionSupport { private String username; private String password; =========================================== My ant target is like this <target name="run.xdoclet"> <xd> <!-- defines the file handled by xdoclet2 --> <fileset dir="${codegenerator}/CodeGenerator/src"> <include name="**/*2Action.java"/> </fileset> <!-- defines the processing of a plugin --> <component classname="org.xdoclet.plugin.xwork.XWorkXMLPlugin" destdir="." package="edit" /> </xd> </target> ====================================== ${struts.runtime.location}"> includes following jar files antlr-2.7.2.jar freemarker-2.3.8.jar ognl-2.6.11.jar oro-2.0.8.jar struts2-core-2.0.12.jar xwork-2.0.6.jar ====================================== <fileset dir="${xdoclet.runtime.location}"> includes following jar files ant-1.5.3-1.jar antlr-2.7.2.jar commons-beanutils-1.7.0.jar commons-cli-1.0.jar commons-collections-3.1.jar commons-discovery-20030211.213356.jar commons-jelly-1.0.jar commons-jelly-tags-define-1.0.jar commons-jelly-tags-xml-20050823.222913.ja commons-jexl-1.0.jar commons-lang-2.0.jar commons-logging-1.0.4.jar dom4j-1.6.jar forehead-1.0-beta-5.jar freemarker-2.3.4.jar generama-1.2.3.jar geronimo-spec-ejb-2.1-rc4.jar geronimo-spec-jms-1.1-rc4.jar icu4j-2.6.1.jar jaxen-1.1-beta-4.jar jdom-b10.jar jmock-1.0.0.jar jsp-api-2.0.jar jstl-1.0.6.jar junit-3.8.1.jar log4j-1.2.8.jar nanocontainer-1.0-beta-3.jar nanocontainer-ant-1.0-beta-3.jar picocontainer-1.0.jar qdox-20051211.114207.jar servlet-api-2.4.jar tagsoup-0.9.7.jar velocity-1.4.jar velocity-dep-1.4.jar xalan-2.6.0.jar xdoclet-2.0.6.jar xdoclet-plugin-actionscript-1.0.4.jar xdoclet-plugin-beaninfo-1.0.4.jar xdoclet-plugin-castor-1.0.4.jar xdoclet-plugin-ejb-1.0.4.jar xdoclet-plugin-externalizer-1.0.4.jar xdoclet-plugin-hibernate-1.0.4.jar xdoclet-plugin-interfaceextractor-1.0.4.j xdoclet-plugin-jdo-1.0.4.jar xdoclet-plugin-jmx-1.0.4.jar xdoclet-plugin-junit-1.0.4.jar xdoclet-plugin-plugin-1.0.4.jar xdoclet-plugin-qtags-1.0.4.jar xdoclet-plugin-spring-1.0.4.jar xdoclet-plugin-struts-1.0.4.jar xdoclet-plugin-tapestry-1.0.4.jar xdoclet-plugin-web-1.0.4.jar xdoclet-plugin-weblogic-1.0.4.jar xdoclet-plugin-webwork-1.0.4.jar xdoclet-plugin-xtags-1.0.4.jar xdoclet-plugin-xwork-1.0.4.jar xdoclet-taglib-qtags-1.0.4.jar xercesImpl-2.2.1.jar xml-apis-1.0.b2.jar xmlParserAPIs-2.6.2.jar xmlunit-1.0.jar xom-1.0b3.jar > Not able to create struts.xml for struts2 framework using xdoclet-2 > -------------------------------------------------------------------- > > Key: XDP-237 > URL: http://jira.codehaus.org/browse/XDP-237 > Project: XDoclet 2 Plugins > Issue Type: Test > Reporter: ravishankar > Assignee: Konstantin Pribluda > > Using xdoclet 1.2.3 we were able to generate the code for struts 1.x > framework like struts-config.xml using xdoclet. > We want to create struts.xml file with all action mapping details from our > action classes but we are not able to do it. > <project name="GlobalBuildProperties" basedir="."> > <property file="build.properties" /> > <property name="output.location" value="${project.base}/dist" /> > <property name="jdev.home" value="C:/JDeveloper" /> > <property name="codegenerator" > value="${jdev.home}/jdev/mywork/CodeGenerator" /> > > <!-- Runtime JAR locations for compilation --> > <property name="j2ee.runtime.location" > value="${jdev.home}/j2ee/home/lib" /> > <property name="struts.runtime.location" > value="C:/JDeveloper/jdev/mywork/CodeGenerator/lib/Struts2_Library/Struts2_Library" > /> > <property name="xdoclet.runtime.location" > value="C:/xdoclet2/xdoclet-plugins-dist-1.0.4-bin/xdoclet-plugins-dist-1.0.4/lib" > /> > <taskdef name="xd" classname="org.xdoclet.ant.XDocletTask"> > <classpath> > <fileset dir="${xdoclet.runtime.location}"> > <include name="**/*.jar" /> > </fileset> > <fileset dir="${j2ee.runtime.location}"> > <include name="**/*.jar" /> > </fileset> > <fileset dir="${struts.runtime.location}"> > <include name="**/*.jar" /> > </fileset> > </classpath> > </taskdef> > </project> > ============ > <?xml version="1.0" encoding="UTF-8" ?> > <project name="XDocletBuildDemo" basedir="."> > <import file="build-properties.xml"/> > <target name="run.xdoclet"> > <xd> > <!-- defines the file handled by xdoclet2 --> > <fileset dir="${codegenerator}/CodeGenerator/src"> > <include name="**/*.java"/> > </fileset> > <!-- defines the processing of a plugin --> > <component > classname="org.xdoclet.plugin.struts.StrutsConfigXMLPlugin" > destdir="${project.base}" validate="false" > filename="struts.xml"/> > <component classname="org.xdoclet.plugin.xwork.XWorkXMLPlugin" > destdir="${project.base}" package="com.infosys" > filename="struts.xml" extends="webwork-default" > /> > </xd> > </target> > </project> > But the file is not getting generated. > created a simple action class > import com.opensymphony.xwork2.ActionSupport; > public class HelloAction extends ActionSupport > { > private String message; > public String getMessage() > { > return message; > } > public void setMessage(String message) > { > this.message = message; > } > public String execute() throws Exception > { > setMessage("Hello! Welcome in the world of Struts2."); > > return SUCCESS; > } > } > Please give me a sample of how to create struts.xml file using xdoclet-2 > plugins. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira ------------------------------------------------------------------------------ SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada. The future of the web can't happen without you. Join us at MIX09 to help pave the way to the Next Web now. Learn more and register at http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/ _______________________________________________ xdoclet-plugins-interest mailing list xdoclet-plugins-interest@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/xdoclet-plugins-interest