Tomcat novice Raiders

xiaoxiao2021-03-06  41

Tomcat Novice Raiders 1, download the necessary software 1JDK 1.4.2222222222.02, Configuring Environment Windows System User: My Computer ------> Right button -------> Properties -------> Details - -----> Environmental variable PATH = x: /jdk1.4.2/bin java_home = x: /jdk1.4.2catalina_home=x: / tomcat (here is Tomcat_Home = x: / tomcat) Note: Here X is installed driver. Here is how to set up the Startup.bat file in the bin directory. We can open Startup.bat in the editing state, see that this file needs to read the system variable, we set the one.

For example, the current STARTUP.BAT file content of my version Tomcat is as follows: @echo offif "% os%" == "Windows_NT" setLocalRem ---------------------------------------------------------------------------------------------------------------------------------------- -------------------------------------------------- --- Rem Start Script for the Catalina ServerRemreme $ ID: Startup.bat, V 1.4 2002/01/15 02:55:38 Patrickl Exp $ REM ----------------- -------------------------------------------------- ------ Rem guess catalina_home if not definedif Not "% catalina_home" == "" goto gothomeset catalina_home = .IF exist "% catalina_home / bin / catalina.bat" goto okhomeset catalina_home = ..: gothome est exist "% CATALINA_HOME% / bin / catalina.bat" goto okHomeecho The CATALINA_HOME environment variable is not defined correctlyecho This environment variable is needed to run this programgoto end: okHome set EXECUTABLE =% CATALINA_HOME% / bin / catalina.bat rem Check that target executable existsif exist "% EXECUTABLE%" goto okExececho Can not find% EXECUTABLE% echo This file is needed to run this programgoto end: okExec rem Get remaining unshifted command line arguments and save them in THESET CMD_LINE_ARGS =: setargsif "% 1" == "" "Goto Donesetargsset cmd_line_args =% cmd_line_args%% 1shiftgoto setargs: donsetargs call"% execrestable% "Start% cmd_line_args%: End We can clearly see this file Read the value of the system variable Catalina_home, so we can set the Catalina_Home to Tomcat in the environment variable. 3, start, close Tomcat has 2 methods can be started, close the installed Tomcat: 1 Direct click Run BIN directory STARTUP.BAT and shutdown.bat files. 2 Since we set the path before, we directly type Startup or shutdown directly in the DOS window. 4, set the virtual directory editing server file (x: /tomcat/conf/server.xml) Because you want to read the information of the Server file when Tomcat is started, you must restart Tomcat after changing the Server file.

转载请注明原文地址:https://www.9cbs.com/read-82870.html

New Post(0)