On Fri, 2008-01-04 at 14:30 +0000, eric deleau wrote: > Hello > > I want to generate in the "web.xml" the following informations > <resource-ref id="ResourceRef_1146669195903"> > <description> > </description> > <res-ref-name>jstockageproperties</res-ref-name> > <res-type>java.net.URL</res-type> > <res-auth>Container</res-auth> > <res-sharing-scope>Shareable</res-sharing-scope> > </resource-ref> > > and in the "ibm-web-bnd.xmi" > > <resRefBindings xmi:id="ResourceRefBinding_1146669195903" > jndiName="url/jstockagePropertyURL"> > <bindingResourceRef > href="WEB-INF/web.xml#ResourceRef_1146669195903"/> > </resRefBindings> > > Actually i use a ANT task but i was unable to generate those > informations > > <target name="webdoclet-was" description="Genere les fichiers web" > depends="init"> > <webdoclet destdir="${src.dir}/web/WEB-INF" > mergedir="${src.dir}/web/WEB-INF" > excludedtags="@ejb,@version,@author,@todo,@param" force="true" > verbose="true"> > <deploymentdescriptor displayname="${ant.project.name}" id="true" > useIds="true" servletspec="2.4" /> > <fileset > dir="${framework.dir}/src/fr/bdf/suren2/framework/common/util/"> > <include name="Suren2JStockage.java" /> > </fileset> > > <webspherewebxml useIds="true"> > <configParam name="virtualHostName" value=""/> > <configParam name="fileServingEnabled" value="true"/> > </webspherewebxml> > </webdoclet> > > To generate "web.xml" file i use the following files > - servlet-mapping.xml > - servlets.xml > - taglibs.xml > - web-security.xml > - welcomefiles.xml > > With the "ejb-resource.xml", i sucessed to add "resourece-ref" in the > "web.xml" file but i can not generate correctly the "ibm-web-bnd.xml" > file > > Someon have i idea to resolve this problem ?
The problem, as you have discovered, is that the template for the ibm-web-bnd.xmi file doesn't include any merge points. So although you can add the resource refs into the standard deployment descriptor via the ejb-resource.xml merge file, you can't do likewise for the binding. Do you absolutely have to use merge files for this, or could you not include a class level @web.resource-ref tag in one of your servlet classes? If you did that, the ibm-web-bnd.xmi would generate a binding from the jndi-name parameter. In your case above, I guess that would be @web.resource-ref name="jstockageproperties" type="java.net.URL" auth="Container" scope="Shareable" jndi-name="url/jstockagePropertyURL" If that's not practical, the only other option would be to edit the template and insert the additional merge point(s) where necessary, and either point the webspherewebxml subtask at your modified version using the templateFile attribute, or rebuild the module jar with the new one. > because i have to delivry a solution for my client on 10 january In that case I guess it's academic anyway. Hope you got it finished on time. Andrew. -- http://pseudoq.sourceforge.net/ Open source java Sudoku application ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace _______________________________________________ xdoclet-user mailing list xdoclet-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/xdoclet-user