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

ServletContext.getServerInfo: Undertow instead of JBoss or Wildfly

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 9.0.0.Final
    • 8.0.0.CR1
    • Web (Undertow)
    • None

      javax.servlet.ServletContext.getServerInfo() identifies Wildfly with:
      "Undertow" and not with JBoss or Wildfly. Is this intentional?

      Some frameworks or extensions (e.g. JavaMelody) use this server info to provide application server specific behaviour.

      So Wildfly (or the newer JBoss AS) is quite different to past versions and this must not be the wrong step to tell something different here, but providing the embedded Servlet Container "Undertow" as response might not be intentional?

      I would suggest to show something with "JBoss" even though Wildfly is the community version name (BTW great move...who wants to have wild flies in his data center...where is our swatter)

      JavaMelody example code, triggered by HttpSessionListener.contextInitialized(ServletContextEvent event) -> initServletContext(event.getServletContext()):

      void initServletContext(ServletContext context) {
      assert context != null;
      this.servletContext = context;
      final String serverInfo = servletContext.getServerInfo();
      jboss = serverInfo.contains("JBoss") ;
      glassfish = serverInfo.contains("GlassFish")

      serverInfo.contains("Sun Java System Application Server");
      weblogic = serverInfo.contains("WebLogic");
      jonas = System.getProperty("jonas.name") != null;

            sdouglas1@redhat.com Stuart Douglas
            andre.pankraz_jira Andre Pankraz (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: