Struts 2
  1. Struts 2
  2. WW-3794

An incorrect jsp name for the plainText results type quietly fails

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Trivial Trivial
    • Resolution: Fixed
    • Affects Version/s: 2.2.1
    • Fix Version/s: 2.3.8
    • Component/s: Core Actions
    • Labels:
      None

      Description

      An incorrect jsp name for the plainText results type quietly fails and there is no logging indication either. For example, jsp/myjsp.jsp might be incorrect. One executes the action and nothing comes out, no error, no nothing. Change to /jsp/myjsp.jsp and suddenly all is well. In revision 651946 of PlainTextResult.java, for example (should be the same in other versions - experienced in Struts 2.2.1), @ line 148, an exception happens and execution jumps to the finally. As a result, the null check is skipped and no chance of logging.

        Activity

        Eric Lentz created issue -
        Eric Lentz made changes -
        Field Original Value New Value
        Description An incorrect jsp name for the plainText results type quietly fails and there is no logging indication either. For example, jsp/myjsp.jsp might be incorrect. One executes the action and nothing comes out, no error, no nothing. Change to /jsp/myjsp.jsp and suddenly all is well. In revision 651946 of PlainTextResult.java, for example (should be the same in other versions - experienced in Struts 2.2.1), @ line 148, something exceptional happens but it isn't thrown. Instead, execution jumps to the finally. An incorrect jsp name for the plainText results type quietly fails and there is no logging indication either. For example, jsp/myjsp.jsp might be incorrect. One executes the action and nothing comes out, no error, no nothing. Change to /jsp/myjsp.jsp and suddenly all is well. In revision 651946 of PlainTextResult.java, for example (should be the same in other versions - experienced in Struts 2.2.1), @ line 148, something exceptional happens but it isn't thrown. Instead, execution jumps to the finally. As a result, the null check is skipped and no chance of logging.
        Eric Lentz made changes -
        Description An incorrect jsp name for the plainText results type quietly fails and there is no logging indication either. For example, jsp/myjsp.jsp might be incorrect. One executes the action and nothing comes out, no error, no nothing. Change to /jsp/myjsp.jsp and suddenly all is well. In revision 651946 of PlainTextResult.java, for example (should be the same in other versions - experienced in Struts 2.2.1), @ line 148, something exceptional happens but it isn't thrown. Instead, execution jumps to the finally. As a result, the null check is skipped and no chance of logging. An incorrect jsp name for the plainText results type quietly fails and there is no logging indication either. For example, jsp/myjsp.jsp might be incorrect. One executes the action and nothing comes out, no error, no nothing. Change to /jsp/myjsp.jsp and suddenly all is well. In revision 651946 of PlainTextResult.java, for example (should be the same in other versions - experienced in Struts 2.2.1), @ line 148, an exception happens and execution jumps to the finally. As a result, the null check is skipped and no chance of logging.
        Hide
        Lukasz Lenart added a comment -

        You will get a warn() in log if stream for given location cannot be loaded. Do you wanna see huge stack trace instead ?

        Show
        Lukasz Lenart added a comment - You will get a warn() in log if stream for given location cannot be loaded. Do you wanna see huge stack trace instead ?
        Hide
        Lukasz Lenart added a comment -

        Please check the current version, refactored a bit

        Show
        Lukasz Lenart added a comment - Please check the current version, refactored a bit
        Lukasz Lenart made changes -
        Fix Version/s 2.3.7 [ 12323448 ]
        Lukasz Lenart made changes -
        Fix Version/s 2.3.8 [ 12323480 ]
        Fix Version/s 2.3.7 [ 12323448 ]
        Lukasz Lenart made changes -
        Resolution Fixed [ 1 ]
        Status Open [ 1 ] Resolved [ 5 ]
        Assignee Lukasz Lenart [ lukaszlenart ]
        Lukasz Lenart made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Lukasz Lenart
            Reporter:
            Eric Lentz
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development