RE: Get tomcat version from webapp code?

2007-12-29 Thread Martin Gainty

1.x taglib is quite old
I would check application functionality on newer 
versionMartin__Disclaimer and 
confidentiality noteEverything in this e-mail and any attachments relates to 
the official business of Sender. This transmission is of a confidential nature 
and Sender does not endorse distribution to any party other than intended 
recipient. Sender does not necessarily endorse content contained within this 
transmission. Date: Fri, 28 Dec 2007 22:15:52 -0500 From: [EMAIL PROTECTED] 
Subject: Re: Get tomcat version from webapp code? To: users@tomcat.apache.org 
 Louis wrote:  David kerber wrote:  Thanks for the response, but I've 
never dealt with that at all. Is   there any sample code that would give me 
the equivalent of something   like getServerProperty( version ), and 
return 5.5.15, or Apache   Tomcat 5.5.15, or something similar?   
D  In a JSP:  %= application.getServerInfo() %   In a Servlet:  
String serverInfo = getServletContext().getServerInfo();  Thanks, guys! 
Believe it or not, I did do a bit of searching for this,  but I guess I didn't 
happen upon the right search terms...  D
- To start 
a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL 
PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] 
_
Share life as it happens with the new Windows Live.
http://www.windowslive.com/share.html?ocid=TXT_TAGHM_Wave2_sharelife_122007

Re: Get tomcat version from webapp code?

2007-12-28 Thread David kerber
Thanks for the response, but I've never dealt with that at all.  Is 
there any sample code that would give me the equivalent of something 
like getServerProperty( version ), and return 5.5.15, or Apache 
Tomcat 5.5.15, or something similar?


D

Martin Gainty wrote:

Hi Dave-

did you look at MBeanServer?

http://tomcat.apache.org/tomcat-5.5-doc/catalina/funcspecs/mbean-names.html

M-
- Original Message - 
From: David kerber [EMAIL PROTECTED]

To: Tomcat Users List users@tomcat.apache.org
Sent: Thursday, December 27, 2007 11:53 AM
Subject: Get tomcat version from webapp code?


  
I know I can get the java version from system.properties, but is there a 
way of getting the tomcat version from inside my app?  If so, how?  I'd 
like to be able to display that on an administrator's information page.


TIA!
D





-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Get tomcat version from webapp code?

2007-12-28 Thread Louis

David kerber wrote:
Thanks for the response, but I've never dealt with that at all.  Is 
there any sample code that would give me the equivalent of something 
like getServerProperty( version ), and return 5.5.15, or Apache 
Tomcat 5.5.15, or something similar?


D

In a JSP:
%= application.getServerInfo() %

In a Servlet:
String serverInfo = getServletContext().getServerInfo();



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Get tomcat version from webapp code?

2007-12-28 Thread David Kerber

Louis wrote:

David kerber wrote:
Thanks for the response, but I've never dealt with that at all.  Is 
there any sample code that would give me the equivalent of something 
like getServerProperty( version ), and return 5.5.15, or Apache 
Tomcat 5.5.15, or something similar?


D

In a JSP:
%= application.getServerInfo() %

In a Servlet:
String serverInfo = getServletContext().getServerInfo();


Thanks, guys!  Believe it or not, I did do a bit of searching for this, 
but I guess I didn't happen upon the right search terms...


D



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Get tomcat version from webapp code?

2007-12-27 Thread Martin Gainty
Hi Dave-

did you look at MBeanServer?

http://tomcat.apache.org/tomcat-5.5-doc/catalina/funcspecs/mbean-names.html

M-
- Original Message - 
From: David kerber [EMAIL PROTECTED]
To: Tomcat Users List users@tomcat.apache.org
Sent: Thursday, December 27, 2007 11:53 AM
Subject: Get tomcat version from webapp code?


 I know I can get the java version from system.properties, but is there a 
 way of getting the tomcat version from inside my app?  If so, how?  I'd 
 like to be able to display that on an administrator's information page.
 
 TIA!
 D
 
 
 
 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Get tomcat version from webapp code?

2007-12-27 Thread Louis

David kerber wrote:
I know I can get the java version from system.properties, but is there 
a way of getting the tomcat version from inside my app?  If so, how?  
I'd like to be able to display that on an administrator's information 
page.


TIA!
D


If you crack open the tomcat ROOT application from a default install and 
look at the index.jsp file, right at the top you'll some something like 
this:


head
   title%= application.getServerInfo() %/title
...

Which displays this (in tomcat 5.5.23):
Apache Tomcat/5.5.23

Other reading:
http://java.sun.com/j2ee/1.4/docs/api/javax/servlet/ServletContext.html



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]