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

Improved CXFJAXRSFilter logic to fix non-CXF resource 404 responses




      When a JAX-RS endpoints are added to a context, the CXF JAX-RS Filter is added to the request filter chain automatically.  This applies to both CXF and non-CXF JAX-RS applications.

      Until now, there was a problem with the CXF JAX-RS Filter where it processes some requests treating them as CXF endpoints (e.g. JSPs and customer filter mappings e.g. .abc file extensions).  This produces a 404 Not Found response even if the non-CXF resource did exist because CXF intercepted it but didn't find a valid CXF resource.

      This problem became much more prominent with the addition of MicroProfile because the new extensions add REST endpoints to the application by default, enabling the CXF JAX-RS Filter automatically - which breaks existing functionality (producing 404s).

      This improvement changes the CXF JAX-RS Filter to check if the requested resource matches one of the valid CXF resource endpoints in the application.  If it does not, then the request is processed by TomEE without being intercepted by CXF.  Existing behaviour for valid CXF resources remains the same.

      This will enable all non-CXF based JAX-RS applications functionality to work in TomEE, where in the past 404 errors would be experienced.





            • Assignee:
              jmeen James Meen
            • Votes:
              0 Vote for this issue
              2 Start watching this issue


              • Created: