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

How to handle 404 when using wildcard instead of error 500 when the wildcard method doesn't exist

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.3.30, 2.5.2
    • Fix Version/s: 2.5.10
    • Component/s: Core
    • Labels:
      None

      Description

      How is it possible to have the same error like this :
      Etat HTTP 404 - There is no Action mapped for namespace [/] and action name [myActionName] associated with context path [/myapp] when I used wildcard ?

      Actually if I used wildcards like this :

      <action name="crud_*" class="com.myapp.firstAction" method="{1}"> 
      	<result name="input">/WEB-INF/jsp/{1}.jsp</result>
      </action>
      

      and if I call this url : http://localhost:8080/myapp/crud_foobar.action and foobar method doesn't exist in firstAction.java I get an error 500 with : java.lang.NoSuchMethodException

      Is it possible to have the same like There is no Action mapped (404) ?

        Issue Links

          Activity

          Hide
          lukaszlenart Lukasz Lenart added a comment -

          Resolved with WW-4050

          Show
          lukaszlenart Lukasz Lenart added a comment - Resolved with WW-4050
          Hide
          walkn COMBEAU added a comment -

          I have the same issue on 2.3.30 and 2.5.2.

          Show
          walkn COMBEAU added a comment - I have the same issue on 2.3.30 and 2.5.2.

            People

            • Assignee:
              lukaszlenart Lukasz Lenart
              Reporter:
              walkn COMBEAU
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development