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

rest or codebehind is adding a trailing space to URL

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Cannot Reproduce
    • None
    • 2.1.3
    • Plugin - REST
    • None

    Description

      I created a web application similar to the struts2-rest-showcase-2.1.2.war. The context root was "poll" and when I made a request for the URL http://localhost:8080/pollsystem/poll, the controller method was being executed and my list was returned. However, the URL had been reconstructed to include a trailing slash http://localhost:8080/pollsystem/. This was resulting in broken links on the page as in:

      http://localhost:8080/pollsystem/poll/poll/3

      After hours of researching the problem, I discovered that I had a folder named poll that I had originally created to contain my web pages. This folder was at the same level as WEB-INF. After removing this folder, the trailing slash was gone!

      I added an empty folder named orders to the struts2-rest-showcase-2.1.2.war application and it started to fail for the same reason.

      Attachments

        1. ASF.LICENSE.NOT.GRANTED--poll.jar
          15 kB
          Scott Stanlick

        Activity

          People

            Unassigned Unassigned
            stanlick Scott Stanlick
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: