Uploaded image for project: 'Struts 2'
  1. Struts 2
  2. WW-1423

URLs with action!method.action should delegate to doAction() method

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Not A Problem
    • Affects Version/s: 2.0.0
    • Fix Version/s: 2.0.0
    • Component/s: Core Actions
    • Labels:
      None
    • Flags:
      Important

      Description

      AppFuse works great with WebWork 2.2.2 and 2.2.3. I tried upgrading to Struts 2.0.0 and found the following issue:

      When I try to go to http://localhost:8080/appfuse/uploadFile!default.html, I get the following error:

      Struts Problem Report

      The Struts has detected an unhandled exception:
      Messages: The default() is not defined in action class
      org.appfuse.webapp.action.FileUploadAction
      File: com/opensymphony/xwork2/DefaultActionInvocation.java
      Line number: 337
      Stacktraces
      java.lang.IllegalArgumentException: The default() is not defined in
      action class org.appfuse.webapp.action.FileUploadAction

      I have the following in struts.properties:

      struts.compatibilityMode.WebWork=true

      As well as in FileUploadAction.java, I have:

      public String doDefault()

      { return INPUT; }

      http://www.mail-archive.com/dev%40struts.apache.org/msg24428.html

      <quote from="Don Brown">
      Yes, this is true - we removed support for do* methods. Perhaps in this
      one case, however, we should allow a doDefault method. Create a ticket
      for it. Perhaps do* support itself should be put back in, but only be
      enabled when in compatibility mode.
      </quote>

      I believe the do* prefix should be supported for WebWork compatibility mode - so current WebWork users can easily upgrade to Struts 2.0.0.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              mraible Matt Raible
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: