Tomcat 服务器安装

Tomcat Server Installation

我在我的系统 (Windows XP) 上安装 Tomcat 服务器。需要设置三个环境变量,即pathJAVA_HOMECLASSPATH。但是对于 Windows 8 ,需要设置另一个环境变量 CATALINA_HOME

为什么会有这种差异?

基本上,Tomcat 服务器 4.x 及以上由 3 个主要部分组成:Catalina(一个 servlet 容器)、Coyote(一个 HTTP 连接器)和 Jasper(一个 JSP 引擎) . AFAIK,Tomcat(至少版本 6、7、8)的安装,regardless of windows OS(XP、7、8) ,包括以下步骤:

  • 设置 JAVA_HOME 环境。变量
  • 设置 CATALINA_HOME 环境。变量(这代表您的 Tomcat 安装的根目录,即显示 servlet 容器的位置)
  • 正在更新 PATH 环境。带有 %PATH%;%JAVA_HOME%\bin;%CATALINA_HOME%\bin
  • 的变量

我的结论是您曾经使用 CLASSPATH 环境错误地安装 Tomcat。多变的。来自 oracle 的信息 docs:


The CLASSPATH variable is one way to tell applications, including the JDK tools, where to look for user classes. (Classes that are part of the JRE, JDK platform, and extensions should be defined through other means, such as the bootstrap class path or the extensions directory.) Setting the CLASSPATH can be tricky and should be performed with care

Tomcat 绝对 notuser 类 相结合,不应该将该变量用于它的安装。