Uploaded image for project: 'Struts 1'
  1. Struts 1
  2. STR-145

unintuitive NullPointerException for wrong configuration entry

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.0 Beta 1
    • 1.0.0
    • Core
    • None
    • Operating System: Linux
      Platform: All
    • 1435

    Description

      Action entry:

      <action path="/froboz" type="foo" name="bar" scope="session"
      validate="true"
      input="myform.jsp"
      >
      <forward name="success" path="/baz.jsp"/>
      </action>

      The problem with this is, that input="myform.jsp" is wrong, it misses the
      leading / (e.g. absolute path stuff...)

      In ActionServlet.java Line 1987ff:

      RequestDispatcher rd = getServletContext().getRequestDispatcher(uri);
      rd.forward(request, response);

      rd will be null, so the next line makes a NullPointerException.

      It would be nice to get a log entry and some form of controlled error (e.g. a
      send error thing or a struts generated exception)

      Attachments

        Activity

          People

            craigmcc Craig R. McClanahan
            richard.kail@cnm.at richard.kail
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: