2 Replies Latest reply on Aug 16, 2004 5:21 PM by anewby

    [SOLVED] XDoclet seems to ignore @struts tags

    anewby

      I've followed the FAQ instructions to update the XDoclet bundled with JBoss-IDE to the shipping general XDoclet distribution (1.2.1). (I moved over all the xdoclet-*-module-1.2.1.jar files and refreshed XDoclet.)

      Before doing this I could not process the strutsconfigxml subtask at all. Now I can.

      However, what I get is a well-formed, but empty struts-config.xml, except for the merge files I have set up.

      <?xml version="1.0" encoding="UTF-8" ?>

      <!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 1.1//EN" "http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd">

      <struts-config>

      <!-- ========== Data Sources Definitions =================================== -->
      <!--
      Define your Struts data sources in a file called struts-data-sources.xml and place
      it in your merge directory.
      -->

      <!-- ========== Form Bean Definitions =================================== -->
      <form-beans>

      <!--
      If you have non XDoclet forms, define them in a file called struts-forms.xml and
      place it in your merge directory.
      -->
      </form-beans>

      <!-- ========== Global Exceptions Definitions =================================== -->
      <!--
      Define your exceptions in a file called global-exceptions.xml and place
      it in your merge directory.
      -->

      <!-- ========== Global Forward Definitions =================================== -->
      <global-forwards>

      </global-forwards>

      <!-- ========== Action Mapping Definitions =================================== -->
      <action-mappings>

      <!-- If you have non XDoclet actions, define them in a file called struts-actions.xml and place it in your merge directory. -->
      </action-mappings>

      <!-- Define your Struts controller in a file called struts-controller.xml and place it in your merge directory. -->

      <!-- Define your Struts message-resources in a file called struts-message-resources.xml and place it in your merge directory. -->

      <!-- Define your Struts plugins in a file called struts-plugins.xml and place it in your merge directory. -->

      </struts-config>


      I have included @struts.action and @struts.action-forward tags in my Action classes:

      /**
      * @struts.action path="/viewsignin"
      * @struts.action-forward name="success" path="/voila.jsp"
      */


      However, these are not processed during XDoclet generation, although all my other ejb, web and jboss tags are processed just fine.

      I'm hoping it's something simple ...

      Adrian

        • 1. Re: XDoclet seems to ignore @struts tags

          Hi,

          It seems that your source files are not processed because you have a too restrictive fileset.
          You can also try to launch the generated XDoclet build file with Ant and set the verbose switch to see what happens.

          Laurent.

          • 2. Re: XDoclet seems to ignore @struts tags
            anewby

            Laurent,

            You were exactly right - thank you. I had religioiusly followed the Tutorial Fibo example to get a working environment and then stupidly forgotten to remove the **/*Servlet.java fileset restriction in the webdoclet fileset.

            Everything is now perfect!

            Regards,
            Adrian