Methods for installing TOMCAT servers and configuring virtual directories under Windows systems _tomcat

Source: Internet
Author: User

Install Tomcat and configure environment variables
install JDK, that's all I have to say.
Specify the installation path when installing, I specify: D:\Program files\java\jdk1.6.0_05
3. Unzip the download of the Apache-tomcat-5.5.23.zip,
I'm assigning D:\Program files\apache-tomcat-5.5.26.

When the installation is complete, open "My Computer"-> "System Properties"-> "Environment variables" in "User variables"

New "Catalina_home"
The value of the variable is: D:\Program files\apache-tomcat-5.5.26

New "Java_home"
The value of the variable is: D:\Program files\java\jdk1.6.0_05

New "PATH"
The value of the variable is: java_home%\bin

The directories under Tomacat are: bin,common,conf folders.
Put the JSP file under D:\Program files\apache-tomcat-5.5.26\webapps\root.
Perform D:\Program Files\apache-tomcat-5.5.26\bin\startup.bat start tomcat
Perform D:\Program Files\apache-tomcat-5.5.26\bin\shutdown.bat shut down Tomcat

Configuring virtual Directories
Configuration method:
1. Modify ports: Change the Port = "8080" in the Tomcat 5.5\server.xml file to port = "80"
2. Create a virtual directory: the virtual directory must contain: Web-inf folder and Web.xml file, Web.xml must be placed under Web-inf folder (can be copied to Tomcat 5.5\webapps\root\web-inf)

3. Modify the contents of the copied Web.xml file:

   <!--jspc servlet mappings start-->
       Remove the middle code
   <!--jspc servlet mappings End-->

4. Modify the contents of the Tomcat 5.5\server.xml file and add to the <HOST></HOST> between:

    <context path= "/web (map name)" docbase= "f:\web (native decision Path)" reloadable= "true" debug= "0"/>

5. Found in the Tomcat 5.5\conf\web.xml file:

     <servlet>

    <servlet-name>default</servlet-name>

    <servlet-class> org.apache.catalina.servlets.defaultservlet</servlet-class>

    <init-param>

      <param-name >debug</param-name>

      <param-value>0</param-value>

    </init-param>

    < init-param>

      <param-name>listings</param-name>

      <param-value>false</param-value > Default is: False to True

    </init-param>

    <load-on-startup>1</load-on-startup>

  </ Servlet>

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.