RobGrant
21st January 2005 15:24 UTC
Tomcat question - I'm being lame and useless
Hi, lame and useless Rob here
Sorry to bother you folks but there are some bright cookies amongst you and I need someone who can tell me this:
In my installer I need to detect the Apache Tomcat version. There is no regular way to do this as the method changes between versions (clever huh) but apparently the ServletContext#getServerInfo() command (thing) works.
I'm not sure where to put this or what to do with it. I know this is slightly off-topic but it is regarding my NSIS installer and I'm at the end of my tether regarding it!
Thanks for reading guys
Rob
Manyaka
21st January 2005 15:35 UTC
Why dont you use registry keys dood.Try using the same coding as you would to get the windows version, but just read in difforent registry keys.
RobGrant
21st January 2005 15:46 UTC
Honestly uh mate I've tried. The key locations change across versions. And even change within the same version number. And even if this weren't enough, there might be older keys hanging around from previous installs.
Ta for reply tho :)
kichik
21st January 2005 17:29 UTC
From Tomcat FAQ:
http://jakarta.apache.org/tomcat/faq/misc.html#version
You were almost there ;)
RobGrant
25th January 2005 08:45 UTC
Aha! That's the little wotsit. Yeah, I'm not sure how to proceed with it, i.e. how to write a Java app which will hook into it (and even if I do this, will tomcat have to be running already for it to be detected?).
kichik
27th January 2005 14:21 UTC
You can take a look inside this version.bat and imitate it or you can simply include the batch file itself and execute it as is.