Forums Register Login

How I can test URL connectivity

+Pie Number of slices to send: Send
Hi,

What is the best approach to verify connectivity to any HTTP URL in java?

Is there any lightweight call that could be made to verify that the server is working?

Thanks
+Pie Number of slices to send: Send
Opening a socket is the lightest thing I can think of.
If you want to make sure that you are connecting to an HTTP server, you'll either have to use a socket and manage the protocol yourself or read the result from an HttpUrlConnection.
+Pie Number of slices to send: Send
you can write a servlet to respond to your http request.
You need to run your client on one side, and servlet on the other end to respond.
(if you want to go for http instead of socket)
+Pie Number of slices to send: Send
Chilkosae Cozea wants to test if any random server is listening for HTTP request. Why would you then want to set up a server container yourself?
What does a metric clock look like? I bet it is nothing like this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 934 times.
Similar Threads
checking network connectivity through javascript ????
Exam 484
RMI freezes on Naming.lookup
not able to load images
Legacy Connectivity
More...

All times above are in ranch (not your local) time.
The current ranch time is
Apr 16, 2024 02:20:31.