Uploaded image for project: 'TomEE'
  1. TomEE
  2. TOMEE-4424

Request not matched to CXF request has trailing slash and a welcome-file is defined

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 10.0.0-M3
    • 10.0.0
    • None
    • None

    Description

      This was initially reported by a user here: https://lists.apache.org/thread/h94cg5d19y8x2klc6orzw21z7x0rw7v1 

       

      In TOMEE-4406 i reworked how a request is routed between CXF and "normal servlet land", however this introduces a regression if a web.xml that looks like this is used (can happen quite frequently with JSF for example):

          <servlet-mapping>
              <servlet-name>Faces Servlet</servlet-name>
              <url-pattern>*.xhtml</url-pattern>
          </servlet-mapping>
          <welcome-file-list>
              <welcome-file>index.xhtml</welcome-file>
          </welcome-file-list>
      

      As per the servlet spec this causes a GET /api/users/ to be matched to the servlet path /api/users/index.xhtml:

      The use for this facility is made clear by the following common example: A welcome file of index.html can be defined so that a request to a URL like host:port/webapp/directory/, where directory is an entry in the WAR that is not mapped to a servlet or JSP page, is returned to the client as host:port/webapp/directory/index.html.

      Which in turn causes CXFJAXRSFilter to detect the Faces Servlet and not forward the request to CXF

      Attachments

        Issue Links

          Activity

            People

              jungm Markus Jung
              jungm Markus Jung
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 1.5h
                  1.5h