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

Struts throws stack trace instead of 404 when an action doesn't exist

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0.6
    • 2.0.10, 2.1.0
    • Core Actions
    • None

    Description

      If I request an action that doesn't exist, Struts displays a "Struts Problem Report" page with a stack trace like the following:

      here is no Action mapped for namespace / and action name blabla. - [unknown location]
      at com.opensymphony.xwork2.DefaultActionProxy.prepare(DefaultActionProxy.java:186)
      at org.apache.struts2.impl.StrutsActionProxyFactory.createActionProxy(StrutsActio

      In my struts.xml:

      <constant name="struts.devMode" value="false"/>
      <constant name="struts.i18n.encoding" value="UTF-8"/>
      <constant name="struts.action.extension" value="html"/>
      <constant name="struts.objectFactory" value="spring"/>
      <constant name="struts.custom.i18n.resources" value="ApplicationResources,errors"/>
      <constant name="struts.multipart.maxSize" value="2097152"/>
      <constant name="struts.ui.theme" value="css_xhtml"/>
      <constant name="struts.codebehind.pathPrefix" value="/WEB-INF/pages/"/>

      Strangely enough, in another application I was able to change struts.devMode from true to false to fix this problem. However, since it's already false in this application, I'm not sure how to fix it.

      To reproduce, go to: http://demo.appfuse.org/appfuse-struts/blabla.html and login with user/user.

      Attachments

        1. 404.patch
          1 kB
          Matt Raible

        Activity

          People

            musachy Musachy Barroso
            mraible Matt Raible
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: