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

Dispatcher prints stacktraces directly to the console

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.5.18
    • 2.5.22, 6.0.0
    • Dispatch Filter
    • None

    Description

      After upgrading from Struts 2.3.x to 2.5.x we noticed a stack trace in our logs which was not previously present. The error is actually quite minor and doesn't impact any functionality, the problem is we have no ability to control its presence in our logs do the way the Dispatcher.java prints directly to the console.

      This can be seen in class org.apache.struts2.dispatcher.Dispatcher around line 586

      Only after the error is printed is a check made on whether to handle it. The exception is then rethrown.

      I think it would make more sense to use the logging framework to log exceptions or otherwise give us some control over whether this appears. As it is it's impossible to turn it off.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              stuartharper Stuart Harper
              Votes:
              1 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: