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>