How Android browsers access the Java Web

Source: Internet
Author: User

I used to do Android program, can communicate with the server, through the JSON to access data, then the app directly access data, and this time I intend to get the server in the mobile browser JSON parameters, and later found that it is very simple, First need the phone to connect to the server (computer) on the WiFi, such as Cheetah WiFi, second, run the server, in the servo state, and then enter the URL in the mobile browser, this time the URL is very fastidious, For example, the browser on the computer to enter the URL is 127.0.0.1 or localhost, then the phone needs to enter the IP is not so, how to find it, first open the computer cmd, input ipconfig/all, we found in which the IP address as shown, That is, through WiFi to access the computer's URL 192.168.191.1, then replace the IP with this IP, and then start to access, for a simple GET request can be processed immediately.

For example, http://localhost: 8080/181mall/statistics/wait_time.action?order=0&page_size=10&page_no=1

In the browser, change to:/http192.168.191.1:8080/181mall/statistics/wait_time.action?order=0&page_size=10& Page_no=1

The result is:

How Android browsers access the Java Web

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.