Uploaded image for project: 'Karaf'
  1. Karaf
  2. KARAF-7774

ServletContext.getServletContextName() returns wrong value

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 4.4.3
    • None
    • karaf
    • None

    Description

      The ServletContext.getServletContextName() interface javadoc says:

      Returns the name of this web application corresponding to this ServletContext as specified in the deployment descriptor for this web application by the display-name element.
      

      In my app, I drop into karaf's deploy folder a WAB bundle with a web.xml containing only display-name (human-readable string) and listener-class with a ServletContextListener implementation class name. The listener's contextInitialized method is invoked, but event.getServletContext().getServletContextName() returns what appears to be the context path (e.g. "/") instead of the display name.

      Attachments

        Activity

          People

            ggrzybek Grzegorz Grzybek
            amichai Amichai Rothman
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: