]
Kabir Khan updated WFLY-2706:
-----------------------------
Fix Version/s: 9.0.0.Final
ServletContext.getServerInfo: Undertow instead of JBoss or Wildfly
------------------------------------------------------------------
Key: WFLY-2706
URL:
https://issues.jboss.org/browse/WFLY-2706
Project: WildFly
Issue Type: Bug
Components: Web (Undertow)
Affects Versions: 8.0.0.CR1
Environment: CentOS, OpenJDK7
Reporter: Andre Pankraz
Assignee: Stuart Douglas
Fix For: 9.0.0.Final
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;