Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-3744

ServletContext.getContextPath() for ROOT.war should be "", not "/"

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 9.0.0.Alpha1
    • None
    • Web (Undertow)
    • None
    • Hide

      1. Copy the attached war file (modified helloworld quickstart) as ROOT.war to standalone/deployments
      2. Visit http://localhost:8080/HelloWorld
      3. Both context path values should be empty

      Show
      1. Copy the attached war file (modified helloworld quickstart) as ROOT.war to standalone/deployments 2. Visit http://localhost:8080/HelloWorld 3. Both context path values should be empty

      According to JavaDocs (ServletContext.getContextPath and HttpServletRequest.getContextPath): "For servlets in the default (root) context, this method returns "". "

      Using latest 9.0.0.Alpha1-SNAPSHOT nightly build from https://ci.jboss.org/hudson/job/WildFly-latest-master/1334/ the value is returned in both cases as "/" rather than "" (empty string).

        1. ROOT.war
          7 kB
          Sean Flanigan

              sdouglas1@redhat.com Stuart Douglas (Inactive)
              sflanigan Sean Flanigan (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: