Install and configure Tomcat in the LAN to access the Web page.

Source: Internet
Author: User
Tags change settings

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/

 

Related Article

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.