Install and configure Tomcat in the LAN to access the Web page.
1. Official Website http://tomcat.apache.org/, download tomcat, unzip it2. Download javaJDK from www.oracle.com, as shown in the following figure. Click the yellow highlighter.
Then
Then
Note: Click agree and select the corresponding system. I am windows 32-bit. Download and install
3. Set environment variables,
I don't know about the apple system. In win7, right-click computer> Properties> change settings in the lower right corner> advanced> environment variable (), create a user variable (the one above), and name the variable CATALINA_HOME, the variable value is the decompressed path, eg: D: \ Program Files \ apache-tomcat-9.0.0.M1-windows-x86 \ apache-tomcat-9.0.0.M1 (open the last pile of Files), OK, and then create a new variable name JAVA_HOME, the variable value is the just-installed directory (another time in the middle, I directly create a folder jre In the first installation file), and my variable value is D: \ Program Files \ javaJDK (opening is also a pile of Files)
4. Configure tomcat,
Open the decompressed tomcat, click the conf file, and right-click server. open xml in notepad, scroll to the bottom, and add a () on the
5. Create a test file
Bytes
6. view your IP address
Start> Enter cmd, press enter> enter panel, enter ipconfig, press enter> View IP address ()
7. In the tomcat pressurization folder, click bin, find start. bat, right-click to send the desktop shortcut (this is convenient), and double-click. You will see a panel.
8. Yeah! You can do the experiment!
In your address bar (local address bar or browser address bar), enter the IP Address: 8080/path value/index.html, eg: 192.168.0.3: 8080/baozi/index.html
When the port number is 80, you can skip the port number. The index.html file can also be left empty by default. The above is a wildcard example.
In this way, any computer on the same LAN can access this file in the browser. It is very convenient to create a mobile page and send it directly to the mobile phone url.
Ps:
Change the port number. The location is still server. xml, Which is 192.168.0.3/baozi/