The following comment has been added to this issue:

     Author: Bernardo Zosa
    Created: Tue, 25 Jan 2005 1:46 AM
       Body:
I have the same problem.  I don't have a direct solution, but I do have a 
work-around that's pretty easy to do:

Step 1) Remove struts doclet information in your base action class
Step 2) Create a new empty action class that extends your base class and move 
the original struts doclet to this new empty class.

Your "other" action class that extends the base action class should no longer 
create a duplicate action entry because the base action class doesn't have any 
struts xdoclet information anymore.

Your new empty class is essentially the same as the base class and should 
function exactly as it were the base action class itself.

I'm not sure if latest version of struts-doclet already fixed this problem, but 
this worked for me without having to do any upgrade.  Hope this helps :-)

Regards,
Bren
---------------------------------------------------------------------
View this comment:
  
http://opensource.atlassian.com/projects/xdoclet/browse/XDT-683?page=comments#action_15771

---------------------------------------------------------------------
View the issue:
  http://opensource.atlassian.com/projects/xdoclet/browse/XDT-683

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: XDT-683
    Summary: inheritance breaks struts action forwards
       Type: Bug

     Status: Open
   Priority: Major

 Original Estimate: Unknown
 Time Spent: Unknown
  Remaining: Unknown

    Project: XDoclet
 Components: 
             Apache Module
   Versions:
             1.2 Beta 3

   Assignee: xdoclet-devel (Use for new issues)
   Reporter: Greg Merrill

    Created: Thu, 23 Oct 2003 8:50 AM
    Updated: Tue, 25 Jan 2005 1:46 AM

Description:
If I have a custom action TestSuperAction which is subclassed by another class 
TestSubAction, duplicate action/forward entries are produced for the subclass 
in struts-config.xml.

Here is sample code:

/**
 * @struts.action
 *    path="/superPath"
 *
 * @struts.action-forward
 *    name="superForward"
 *    path="/superForward"
 * 
 * @version $Revision$
 */
public class TestSuperAction extends Action {

}

/**
 * @struts.action
 *    path="/subPath"
 *
 * @struts.action-forward
 *    name="subForward"
 *    path="/subForward"
 * 
 * 
 * @version $Revision$
 */
public class TestSubAction extends TestSuperAction {

}

When I run XDoclet, I get these entries in struts-config.xml.

    <action
      path="/superPath"
      type="TestSuperAction"
      unknown="false"
      validate="true"
    >
      <forward
        name="superForward"
        path="/superForward"
        redirect="false"
      />
    </action>
    <action
      path="/subPath"
      type="TestSubAction"
      unknown="false"
      validate="true"
    >
      <forward
        name="subForward"
        path="/subForward"
        redirect="false"
      />
      <forward
        name="superForward"
        path="/superForward"
        redirect="false"
      />
    </action>
    <action
      path="/superPath"
      type="TestSubAction"
      unknown="false"
      validate="true"
    >
      <forward
        name="subForward"
        path="/subForward"
        redirect="false"
      />
      <forward
        name="superForward"
        path="/superForward"
        redirect="false"
      />
    </action>

The TestSuperAction mapping is correct.  But for TestSubAction, I was not 
expecting duplicate action entries with merged, duplicate forwards.  I was 
expecting to get something more like this:

    <action
      path="/subPath"
      type="com.transcendsys.platform.web.ccc.TestSubAction"
      unknown="false"
      validate="true"
    >
      <forward
        name="subForward"
        path="/subForward"
        redirect="false"
      />
    </action>



---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.

If you think it was sent incorrectly contact one of the administrators:
   http://opensource.atlassian.com/projects/xdoclet/secure/Administrators.jspa

If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira



-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
_______________________________________________
xdoclet-devel mailing list
xdoclet-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xdoclet-devel

Reply via email to