Directly an example description:
<% @ Page ContentType = "text / html; charset = big5" session = "false" import = "java.io. *"%>
"); while ((line = br.readline ())! = null) {OUT.PRINTLN (LINE); out.flush ();} out.println (" pre>"); is.close (); isr.close (); br.close ();} catch (IOException E ) {OUT.PRINTLN (E); Runtime.exit (1);}%> body> html> <% @ page contenttype = "text / html; charset = big5" session = "false" import = " Java.io. * "%> <% runtime runtime = runtime.getruntime (); process process = null; string line = null; inputStre AM is = null; inputStreamReader isr = null; bufferedreader br = null; string ip = "Please hit the IP you want ping here"; // Please modify the above IP address Try {process = runtime.exec ("ping " IP); IS = process.getinputStream (); ISR = New InputStreamReader (IS); br = new bufferedreader (ISR); OUT.PRINTLN ("