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

SelectAction getPath returns null when used with URL rewriting and breaks application

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.3.5
    • 1.3.7
    • Core
    • None
    • WebSphere Platform 6.0 [BASE 6.0.2.5 cf50549.21] r
    • Important

    Description

      When I run with URL rewriting enabled on my server I get InvalidPathException("No action config found for the specified url.". Here is the problem in SelectAction.getPath. The request.getPathInfo() returns an empty string and the test on path == null stops the 2 further attempts to get the servlet path. In the 1.2.4 RequestProcessor the statement
      "path = (String) request.getAttribute(INCLUDE_SERVLET_PATH);" is unconditional so the problem does not happen.

      Here is the code in SelectAction:

      if (path == null)

      { path = request.getPathInfo(); }

      // For extension matching, match on the servlet path
      if (path == null) {
      path =
      (String) request.getAttribute(Constants.INCLUDE_SERVLET_PATH);

      if (path == null)

      { path = request.getServletPath(); }

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned
            jnannizz Jill Nannizzi
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment