All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.oreilly.servlet.VersionDetector

java.lang.Object
   |
   +----com.oreilly.servlet.VersionDetector

public class VersionDetector
extends 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.1, 2000/09/22, added detection of Servlet API 2.3
Author:
Jason Hunter, Copyright © 2000

Constructor Index

 o VersionDetector()

Method Index

 o getJavaVersion()
Determines the JDK version number.
 o getServletVersion()
Determines the Servlet API version number.

Constructors

 o VersionDetector
 public VersionDetector()

Methods

 o getServletVersion
 public static String getServletVersion()
Determines the Servlet API version number.

Returns:
a String representation of the servlet version
 o getJavaVersion
 public static String getJavaVersion()
Determines the JDK version number.

Returns:
a String representation of the JDK version

All Packages  Class Hierarchy  This Package  Previous  Next  Index