Dear All,
I want to develop a network application in java based on HTTP.. In which one server and other is client application..... The problem is that, How can I check whether a server ip address is valid or not ?

Please tell me... I am very thankful to you....
Regards
Tabish Saroha

Recommended Answers

All 4 Replies

Why not just try to connect to the server and see if that works?

I already connect with the server, but my question is that i want to check whether server is denied or exists..... means I wanna use a condition on ip address, whether IP exists or not ?

I don't think you can do that definitively. If the server chooses not to respond to you then you can't tell if it's there, or not there.
You could try to ping the server, but once again, if it decides not to respond then there's nothing you can do.

I already connect with the server, but my question is that i want to check whether server is denied or exists..... means I wanna use a condition on ip address, whether IP exists or not ?

Well if the client is in java surround the statement which initiates the connection with a try catch statement that should help to see whether a connection was successfully made or not

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.