Uploaded image for project: 'JBoss Web Services'
  1. JBoss Web Services
  2. JBWS-1808

BackwardCompatibleURLPatternDeploymentAspect is mangling valid URLpatterns

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Minor
    • jbossws-2.0.2
    • None
    • None
    • None

    Description

      BackwardCompatibleURLPatternDeploymentAspect overrides method getExplicitPattern to check for and remove any leading context root in a servlet mapping URL pattern e.g. if the context root is "/provider" and the URL pattern is "/provider/services/* it 'corrects' the URL pattern to "/services/". However, it is over-eager. For example, if the context root is "/provider" and the URL pattern is "/providerservices/" then the pattern is mangled to "services/*" causing problems down the line. The check at line 59 needs to be modified a follows

      StringTokenizer st = new StringTokenizer(urlPattern, "/");

      • if (st.countTokens() > 1 && urlPattern.startsWith(contextRoot))
        + if (st.countTokens() > 1 && urlPattern.startsWith(contextRoot + "/")) { urlPattern = urlPattern.substring(contextRoot.length()); }

      Attachments

        Issue Links

          Activity

            People

              tdiesler@redhat.com Thomas Diesler
              rhn-engineering-adinn Andrew Dinn
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: