Fast Track: Too lazy to create the application yourself? Or maybe you just want to see how TLD re-generation works, without creating the application. Either way, you can download the application here. And then open it in the IDE and take all the steps below to quickly set up the re-generation functionality.
Download and extract XDoclet
1.2.2.
\* @jsp.tag name="DisplayLogoTag" bodycontent="empty"
\* @jsp.attribute name="size" required="true" rtexprvalue="true" type="java.lang.String"
\* @jsp.tag name="FormatTextTag" bodycontent="scriptless"
\* @jsp.attribute name="style" required="true" rtexprvalue="true" type="java.lang.String"
<target name="webdoclet-tld" depends="init, init-xdoclet"
description="Regenerate TLD">
<echo>+---------------------------------------------------+</echo>
<echo>| |</echo>
<echo>| C R E A T I N G T L D |</echo>
<echo>| |</echo>
<echo>+---------------------------------------------------+</echo>
<webdoclet destdir="${web.docbase.dir}/WEB-INF"
excludedtags="@author"
verbose="false">
<fileset dir="${src.dir}">
<include name="\*\*/\*Tag.java"/>
</fileset>
<jsptaglib Jspversion="2.0" taglibversion="1.0" shortName="simpletaglib"
uri="http://netbeans.org/tlds/SimpleTagLib"
filename="SimpleTagLib.tld" validateXML="true"/>
</webdoclet>
</target>
If you add this target to a different Ant file, you can import it into your project's own build.xml file by including this line at the top of your build.xml file:
<import file="path-to-external-Ant-file/name-of-Ant-file.xml"/>
Note that XDoclet currently does not support JSP 2.0. Therefore, if your tag handlers extend SimpleTagSupport, XDoclet will not generate the TLD file correctly. Therefore, just before you invoke the target, change the SimpleTagSupport to TagSupport, and then change it back after you've finished re-generating the TLD.
Thank you very much for this article.
However, I got the following question.
To what specific directory within NetBeans I need to extract XDoclet?
Thank you very much.
Regards,
Anatoly
xdoclet.root.dir=c:/xdoclet-1.2.2
Check out Brian's article, because this is where I learnt everything I know on XDoclet:
http://www.netbeans.org/kb/41/j2ee-server-integration.html
Hope this helps, if not please leave another comment!