Results 1 to 3 of 3

Thread: servlets

  1. #1
    priyacvr is offline Member
    Join Date
    Sep 2009
    Posts
    10
    Rep Power
    0

    Question servlets

    hi all...
    How to find the trace route through java servlets........ I want the router, switches, hub informations between a client and server.....

  2. #2
    travishein's Avatar
    travishein is offline Senior Member
    Join Date
    Sep 2009
    Location
    Canada
    Posts
    684
    Rep Power
    6

    Default

    the servlet API does not do this.

    You could have a servlet doGet() method invoke a system command, that is to call the host's traceroute program and then capture the output of it and return the process output to the html response .

  3. #3
    priyacvr is offline Member
    Join Date
    Sep 2009
    Posts
    10
    Rep Power
    0

    Thumbs up

    thank u... i tried,
    Process proc = Runtime.getRuntime().exec("tracert address");
    BufferedReader input=new BufferedReader(new InputStreamReader(proc.getInputStream()));
    String output=null;
    String tracert="";
    while ((output = input.readLine())!= null)
    {
    tracert+=output;
    out.println(output);
    }
    it is working............

Similar Threads

  1. Servlets
    By javahelp00 in forum New To Java
    Replies: 1
    Last Post: 02-28-2009, 06:28 PM
  2. 1 form 2 servlets
    By sandor in forum Java Servlet
    Replies: 2
    Last Post: 01-22-2008, 10:47 AM
  3. Deploying Servlets
    By gapper in forum New To Java
    Replies: 2
    Last Post: 01-17-2008, 12:43 PM
  4. servlets or jsp
    By krishnapal in forum Advanced Java
    Replies: 1
    Last Post: 12-13-2007, 02:31 PM
  5. Servlets
    By nagaroopanandha in forum Advanced Java
    Replies: 1
    Last Post: 08-07-2007, 02:09 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •