I am writing a Web application with Java, and this WAR application may be deployed to different application servers, such as Tomcat/JBoss/Jetty/Weblogic.
For diagnos
I have find some code for getting server information of where you deploy your application.
This code is written in Servlet to get server info in which it is running..
String str1 = getServletContext().getServerInfo();
By this you will get the server name and the server's version info.
I think it will some what help you..