Use WAP-enabled mobile phones to monitor your network

Source: Internet
Author: User

Java is an open, standard, general-purpose network program running platform, Java-written applications can be applied to a variety of different platforms and terminals without modifying the program, similarly, WAP based mobile phones can also use Java platform or with back-end server interaction to complete a variety of complex functions. Have you ever thought that sitting in a car or walking on the road can easily manage your complex Internet or local area network. This problem can be solved by using the Java servlet.

Here is a simple Java servlet program that allows you to monitor your network on WAP-enabled handsets, similar to a DOS ping command. This program performs a ping on your host and displays the results on your phone. Use such as: Http://host/servlet/WAPping or the IP address as a parameter to the host, such as: http://host/servlet/WAPping?IP_address

You can change commonly used settings in the configuration file, the servlet program must take the configuration file name as the initial parameter, the parameter describes a text file name, the file holds the information you set.

For Web.xml in Tomcat, you can set:

<servlet>
   <servlet-name>WAPping</servlet-name>
   <servlet-class>WAPping</servlet-class>
   <init-param>
   <param-name>config</param-name>
   <param-value>config file path
   </init-param>
   </servlet>

In the configuration file, empty rows and rows beginning with # or file://are ignored, and the following parameters are currently supported:

# prefix is used for host commands, the default value is NULL

# for a host based on NT system, you must set up prefix=command.com/c

Prefix=command.com/c

# ping option, default value is null

# For example 3 displays the request and interprets the address to the host name:

Ping=-n 3-a

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.