使用JBOSS IDE的xdoclet来generate struts xdoclet时,可能会出现以下error:
Can't create a strutsconfigxml element under webdoclet. Make sure the jar file containing the corresponding subtask class is on the classpath specified in the <taskdef> that defined {2}.
出现error的原因是:eclipse的xdoclet plugin里并没有包含与struts相关的xdoclet jar: xdoclet-apache-module-XXX.jar。
解决方法是:从xdoclet web site download the latest xdoclet package,然后把其中的xdoclet-apache-module-XXX.jar copy to ECLIPSE_HOME/plugins/org.jboss.ide.eclipse.xdoclet.core_XXX目录下即可。
类似的,如果你要使用spring xdoclet,那么应该把xdoclet-spring-module-XXX.jar copy to ECLIPSE_HOME/plugins/org.jboss.ide.eclipse.xdoclet.core_XXX目录下