Reputation: 984
I developed an application using JSP/Servlets, it runs on tomcat server. I am using the Tomcat Manager Commands to do some stuff like (deploy/undeploy... etc.). The problem is that the tomcat manager commands differ from version 6 to 7. Anyway, my application has to detect the version of the tomcat it is running on, and according to that change the commands in the application. Any Ideas?
Upvotes: 0
Views: 389
Reputation: 86
Windows:
java.exe -cp lib\catalina.jar org.apache.catalina.util.ServerInfo
Linux:
java -cp lib/catalina.jar org.apache.catalina.util.ServerInfo
Upvotes: 0
Reputation: 12880
You can probably make use of getServerNumber()
method in org.apache.catalina.util.ServerInfo
class in catalina.jar
file.
Upvotes: 2