http//www.blogjava.net/qingshow/archive/2010/01/17/309846.html-------------------------------------------------------------------------------------use Tomcat to build a Web server target: Have your own website and domain name for free. Environment: Windows2003+jkd1.6+tomcat5.5+ Peanut Shell Dynamic Domain name 6.0My LAN IP:192.168.0.118Part One: Building a tomcat server I. Download and install the JDK1.6 1. Set environment variable: The Java_home value is set to C:\JAVA\JDK1.6the. 0_06 classpath value is set to.;%java_home%\lib\; Path new Value Added%java_home%;%java_home%\ Bin; Set the system environment variable in the window2003, in the "My Computer"--"Management"--"Computer Management"--"properties"--"Advanced". 2. Test: Java–version II,1. Download a tomcat. I unzipped it under the D-Disk soft folder. 2. In D:\soft\apache-tomcat-5.5. -\ bin Double-click Startup and a CMD window appears. Startup Success3. In the local browser address bar type: http://localhost:8080/. Local access succeeded4. Enter the browser address bar on the other PC in the LAN: http://192.168.0.118:8080/. Access succeeded as. 5If you install only tomcat one server on your computer, you can change the port in the \tomcat-5.5. -\conf Open Server.xml, find <connector port="8080"Maxhttpheadersize="8192"MaxThreads=" Max"minsparethreads=" -"maxsparethreads=" the"enablelookups="false"redirectport="8443"Acceptcount=" -"ConnectionTimeout="20000"disableuploadtimeout="true"/>the Port="8080"Change into" the", so you don't have to enter a port number in the Address bar. I heard that the telecommunications seal 80, fortunately I use the netcom. Tests such as:6. Change the default program. ① found in Server.xml."localhost"Appbase="WebApps"unpackwars="true"autodeploy="true"xmlvalidation="false"Xmlnamespaceaware="false"> Add <context path= at the back""Docbase="Login (SSH) 2"reloadable="true"/>"localhost"Appbase="WebApps"Unpackwars="true"autodeploy="true"xmlvalidation="false"Xmlnamespaceaware="false"><context path=""Docbase="Login (SSH) 2"reloadable="true"/>② I wrote a login project in Java login (SSH)2. Deploy the project to WebApps in the Tomcat directory, ③ reboot Tomcat, and note the Address bar for http://localhost. The cat is gone. Test Success7. Summary: ① I use the free install version of Tomcat, because the debugging program is convenient, but Tomcat also has a version of the installation, with the system started, the latter is recommended for deployment. ② Please note the settings of Tomcat itself, if you have a username and password, be sure to fill it in. ③ Log in the peanut shell, the browser enters http://the qingshow.vicp.net automatically goes to login (SSH) 2. The second part: registration, download, login peanut shell. Part III: Router Setup1. Enter 192 in the browser.168.0. 1 Landing router. 2. Port mappings. Radio: Activation name: Pick up a personal IP address: Your intranet IP (mine is 192.168.0.118protocol mode: Generally select TCP private service port: the(refer to Tomcat server port 80) public service port: the(extranet access port) Scheduling: Choose Your Own (the default is OK) and finally remember to save. 3. Note This step, I listed this step separately because there are a lot of people on the Internet that want to activate the DMZ, but this is dangerous. But I didn't activate the DMZ, so if you want to run naked, you can think about it. 4. Domain name access test in LAN. Enter HTTP in the address bar://qingshow.vicp.net Test Success5. Extranet access testing. I am in Internet cafes, ie Address bar input http://qingshow.vicp.net such as success, such as. 6The server is finished, it is recommended to use JEECMS, url www.jeecms.com.