Install tomcat in windows <version>

Source: Internet
Author: User
Tags tomcat
Install tomcat in windows
Revision
Install jdk1.3
Note: If you have installed a java version earlier than 1.3, delete all files of this version and use rregedit to delete all content under hkey_local_machinesoftwarew.oft.
Then install jdk1.3.
Download jdk1.3 here:
Http://www.chinaasp.com/download/readFolder.asp? Folder = JspDev & name = JSP % BF % AA % B7 % A2 % B0 % FC
Then note that if your system is a Chinese system, the system registry may be faulty. Use regedit to open the registry and check your oft,
The location is hkey_local_machine-> software-> export oft-> Find "Java Runtime Environment"
Export this stuff to File 1. reg ....
Edit it with notepad, replace "Java Runtime Environment" with "Java Runtime Environment", and then import it.
Download tomcat
Win32 version http://jakarta.apache.org/builds/tomcat/release/v3.1/bin/jakarta-tomcat.zip 2.26 mb
Install tomcat
Decompress the file in the jakarta-tomcat.zip package to x: omcat. X is the drive name.
Set environment variables
In autoexec. bat, win9x uses the set statement to set environment variables, for example, set TOMCAT_HOME = d: omcat.
For winnt/win2k, right-click my computer and select Properties. In the displayed dialog box, click "system features", select "Advanced" tab, and click "environment variables ", you can edit the environment variables of the system.
TOMCAT_HOME value: x: omcat (use TOMCAT_HOME to indicate the tomcat root directory)
JAVA_HOME value: x: jdk1.3 (use JAVA_HOME to indicate the jdk1.3 installation directory)
CLASSPATH value: x: jdk1.3libools. jar; x: omcatclasses; x: omcatlib
Test tomcat
Run x: ombatinstartup. bat
Then, type http: // localhost: 8080/in the browser. If you see the image of tomcat 3.1, it indicates that you have successfully configured tomcat.
Test JSP
Now we create the directory D: myJSP
A file named test. jsp is stored in the file. The content is as follows:
<% @ Page contentType = "text/html; charset = gb2312" %>
<%
Out. println ("This is my first jsp program ");
%>
Modify tomcatconfserver. xml. At the end of this file, you can see some shapes such
<Context path = "/test" docBase = "webapps/test" debug = "0" reloadable = "true">
</Context>
And so on:
<Context path = "/myJSP" docBase = "d: myJSP" debug = "0" reloadable = "true">
</Context>
Path is the web virtual directory, and docBase is the path on the hard disk.
In the address bar of the browser, enter http: // localhost: 8080/myJSP/test. jsp.
(Note: tomcat is case-sensitive. If an error is entered, a 404 error is returned)
The browser displays the following content:
This is my first jsp program
Www.chinaasp.com bird flybird@chinaasp.com original.
 
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.