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();

版本:
1.3, 2002/04/22, added detection of JDK 1.5 and Servlet API 2.4, 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
作者:
Jason Hunter, Copyright © 2000

构造方法摘要
VersionDetector()
           
 
方法摘要
static String getJavaVersion()
          Determines the JDK version number.
static String getServletVersion()
          Determines the Servlet API version number.
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

构造方法详细信息

VersionDetector

public VersionDetector()
方法详细信息

getServletVersion

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

返回:
a String representation of the servlet version

getJavaVersion

public static String getJavaVersion()
Determines the JDK version number.

返回:
a String representation of the JDK version


Copyright © 2013. All Rights Reserved.