Configuring Java JDK and Tomcat server specific steps are as follows: 1:. My computer's properties -> Advanced -> Variable Environment -> We need new system variables (a total of four):
1. Variable name Add: "Path" Variables Advance: "Your JDK installation directory bin", "My installation directory is" c: sunj2eesdk1.4_beta2jdkbin "2. Variable name Add:" ClassPath "variable value Advance (note the quotation number is not filled, there must be a small dot in front, add the following to the line of variables, and use the semicolon shelving, see below, for convenience, I have divided a lot of lines. ):
Your installation directory LibTools.jar;
Your installation directory dt.jar;
Your installation directory bin;
You Tomcat's installation directory CommONClasses;
You Tomcat installation directory commonLib;
You Tomcat installation directory commonLibservlet-Api.jar; "
3. Variable name Add "java_home", value, such as "Your installation directory", for example, my installation directory is: "c: sunj2eesdk1.4_beta2jdk"
4. Variable name Add "Tomcat_HOME" (note, uppercase), the value is "your Tomcat installation directory", for example, my installation directory is "c: tomcatjakarta-tomcat-5.0.14"
Second, configure Tomcat's execution file (.bat): First enter the Tomcat installation directory, find the bin folder, enter the bin and then find the startup.bat file, pay attention, some versions may be different, but the name is always Startup before the name. Click Right-click -> Edit. Open this text, then look for start letters, usually in the end, we only need to add: set tomcat_home = You Tomcat installation directory SET JAVA_HOME = Your JDK installation directory (for example, I What is: c: sunj2eesdk1.4_beta2jdk) Set classpath = You JDK installation directory dt.jar set classpath = your Tomcat installation directory commonLibServlet-Api.jar
The main purpose of this step is to, in execution .jsp files, Tomcat servers can automatically find some Java environment and environment, etc. ...
Ok, the first step and the second step we have completed, the configuration of the system environment variable, and the configuration of Tomcat, there is another problem, that is, set the problem of the virtual directory, why set the virtual directory? Because When we put an address on your browser, we are different from the actual directory of the file. We must set up, the virtual directory will automatically find the actual directory according to our settings.
The configuration virtual directory is mainly configured to configure the server.xml file in the CONF folder under Tomcat. After entering, we open this .xml file in text, (Method is: Select the file, then hold down Shift Right-click, look for "Open Mode", we open in text. You can use Notepad's lookup function, (under Edit menu) Find " host>" Add like this before this host> Code (PATH is a virtual directory, and DocBase is the actual physical directory):
Ok, don't forget to save.
The following things are obvious, we have to build a yuan folder under the D. Write a webpage to name "index.jsp", then we can write http in the browser address bar. Localhost: 8080 / Yuan, so we can see this page, and then everyone can continue to edit it from: Clnara921 (Nara) post, I only make a collection, if there are other purposes, please contact the author.