Home
What's
New?
com.oreilly.servlet
Servlet
Polls
Mailing
Lists
List
Archives
Servlet
Engines
Servlet
ISPs
Servlet
Tools
Documentation
Online
Articles
The
Soapbox
"Java
Servlet
Programming,
Second Edition"
"Java
Enterprise
Best Practices"
Speaking
& Slides
About
Jason
XQuery
Affiliate
Advertising
Info
|
com.oreilly.servlet
Class VersionDetector
java.lang.Object
|
+--com.oreilly.servlet.VersionDetector
- public class VersionDetector
- extends java.lang.Object
A class to determine the current Servlet API version number, and the
current JDK version number. It looks at the available classes and
variables to make the determination. The class can detect Servlet
API versions up to 2.2, and JDK versions up to 1.3.
It can be used like this:
String servletVersion = VersionDetector.getServletVersion();
String javaVersion = VersionDetector.getJavaVersion();
- Version:
- 1.2, 2001/04/11, added detection of JDK 1.4
, 1.1, 2000/09/22, added detection of Servlet API 2.3
, 1.0, 2000/02/08
- Author:
- Jason Hunter, Copyright © 2000
|
Method Summary |
static java.lang.String |
getJavaVersion()
Determines the JDK version number. |
static java.lang.String |
getServletVersion()
Determines the Servlet API version number. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
VersionDetector
public VersionDetector()
getServletVersion
public static java.lang.String getServletVersion()
- Determines the Servlet API version number.
- Returns:
- a String representation of the servlet version
getJavaVersion
public static java.lang.String getJavaVersion()
- Determines the JDK version number.
- Returns:
- a String representation of the JDK version
|