chmod +x jdk-6u20-linux-i586.bin
./jdk-6u20-linux-i586.bin
vim /etc/profile
####jdk+tomcat###
JAVA_HOME=/usr/local/jdk1.6.0_20
CATALINA_HOME=/usr/local/tomcat
CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar:
export PATH=$PATH:$JAVA_HOME/bin
source /etc/profile
[root@linux5 local]# java -version
java version "1.6.0_20"
Java(TM) SE Runtime Environment (build 1.6.0_20-b02)
Java HotSpot(TM) Client VM (build 16.3-b01, mixed mode, sharing)
说明jdk安装成功
tar -zxvf apache-tomcat-5.5.30.tar.gz
mv apache-tomcat-5.5.30 tomcat
cd /usr/local/tomcat/bin
./startup.sh &

停止tomcat
./shutdown.sh
添加一个虚拟主机
vim /usr/local/tomcat/conf/server.xml
在server.xml文档中找到
</Host>
</Engine>
</Service> 
接着添加上面的Host下面添加一下主机内容
<Host name="ecp.10000.com" debug="0" appBase="/doyoo/apache-tomcat-6.0.18/webapps/ecp">
<Context path="" docBase="." debug="0"/>
</Host>
然后重启tomcat,输入域名就能访问了
然后增加一个虚拟目录/web,增加红色标记部分
<Host name="mail.520wan.com" debug="0" appBase="/usr/local/tomcat/webapps/ecp">
<Context path="" docBase="." debug="0"/>
<Context   path="/web"   docBase="/usr/local/tomcat/webapps/ct10000" debug="5"   reloadable="true"   crossContext="true">
</Context>

</Host>
附一段jsp跳转代码
<body>
<form name="formX" action="http://www.163.com/chat/chat/p.do?c=3&f=272&g=221" method="post" target="_self">
</form>
<script language="javascript">
document.formX.submit();
</script>
</body>