Talk About Network



Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Java Help > how can i check...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 3 Topic 15984 of 16069
Post > Topic >>

how can i check that a page is up?

by Trace <Panos100m@[EMAIL PROTECTED] > Apr 17, 2008 at 07:39 AM

Hi in the past i was using the followng code below to check if a
server was up and if it was to call a jsp...
However the jsp now resides to my server so there is no point really
of chekcing if it is up to call it ..
So how can i check that the specific page

e.g http://server.com:8100my.jsp
is up??  (resouces / snip of code
please)

 try {

            InetAddress address =
InetAddress.getByName("servername.com");

            System.out.println("Name: " + address.getHostName());



            System.out.println("Addr: " + address.getHostAddress());

            System.out.println("Reach: " + address.isReachable(3000));


call url ....
}

 } catch (UnknownHostException e) {

            System.err.println("Unable to lookup the sic app");



            mySession.getVariableField(IProjectVariables.TEMP)

                        .setValue("error");

      } catch (IOException e) {

            System.err.println("Unable to reach the sic app");

            mySession.getVariableField(IProjectVariables.TEMP)

                        .setValue("error");



      }




 3 Posts in Topic:
how can i check that a page is up?
Trace <Panos100m@[EMAI  2008-04-17 07:39:42 
Re: how can i check that a page is up?
RedGrittyBrick <RedGri  2008-04-17 16:33:56 
Re: how can i check that a page is up?
Alex.From.Ohio.Java@[EMAI  2008-04-17 12:12:16 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sun May 11 18:57:07 CDT 2008.