× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Hi,

Is anybody knows how to determine platform that Tomcat is running on from a 
servlet? I need to know that because my test environment is on 
Tomcat/Windows2000 and our production box is Tomcat/AS400 and I need to 
determine which driver to use (native or toolbox). When we were using 
Tomcat3.2.4 I just did this:

 String serverInfo = getServletConfig().getServletContext().getServerInfo(); 

This call return value of:

"Tomcat Web Server/3.2.4 (JSP 1.1; Servlet 2.2; Java 1.3.1; OS/400 V5R1M0 
PowerPC; java.vendor=IBM Corporation)" when Tomcat on AS400 and

"Tomcat Web Server/3.2.2 (JSP 1.1; Servlet 2.2; Java 1.3.0; Windows 2000 5.0 
x86; java.vendor=Sun Microsystems Inc.)" when Tomcat is on Windows

I was looking-up for a index of "OS/400" inside that String. The same method 
call under Tomcat4.1.12 returns simple server name as "Apache Tomcat/4.1.12" 
with no reference to OS...

Thanks,

Alex


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.