Tomcat服务器安装(Tomcat Server Installation)

编程入门 行业动态 更新时间:2024-10-24 07:30:43
Tomcat服务器安装(Tomcat Server Installation)

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

为何如此差异?

I was installing Tomcat server on my system (Windows XP). It was required to set three environment variables namely path,JAVA_HOME and CLASSPATH. But for Windows 8 , another environment variable CATALINA_HOME was required to be set.

Why this difference ?

最满意答案

基本上,Tomcat服务器4.x及更高版本由3个主要部分组成:Catalina(一个servlet容器),Coyote(一个HTTP连接器)和Jasper(一个JSP引擎)。 AFAIK,安装Tomcat(至少版本6,7,8), 无论 Windows操作系统(XP,7,8)如何,都包含以下步骤:

设置JAVA_HOME环境 变量 设置CATALINA_HOME环境 变量(这表示Tomcat安装的根,即显示servlet容器的位置) 更新PATH环境 变量%PATH%;%JAVA_HOME%\ bin;%CATALINA_HOME%\ bin

我曾经使用过CLASSPATH环境错误地安装Tomcat。 变量。 来自oracle 文档的信息 :


CLASSPATH变量是告诉应用程序(包括JDK工具)查找用户类的一种方法。 (属于JRE,JDK平台和扩展的类应该通过其他方式定义,例如引导类路径或扩展目录。) 设置CLASSPATH可能很棘手,应该小心执行

Tomcat绝对不会用户类耦合,并且不应该使用该变量进行安装。

Basically, Tomcat server 4.x and above consists of 3 main parts: Catalina (a servlet container), Coyote (an HTTP connector) and Jasper (a JSP engine). AFAIK, the installation of Tomcat (at least version 6, 7, 8), regardless of windows OS (XP, 7, 8), consists of the following steps:

setting JAVA_HOME env. variable setting CATALINA_HOME env. variable (This represents the root of your Tomcat installation i.e shows where servlet container is) updating PATH env. variable with %PATH%;%JAVA_HOME%\bin;%CATALINA_HOME%\bin

My assamtion that you used to install Tomcat incorrectly using CLASSPATH env. variable. Info from the 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 is definitely not coupled with user classes, and one should not use that variable for its installation.

更多推荐

本文发布于:2023-08-06 11:04:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1446690.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:服务器   Tomcat   Installation   Server

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!