Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Verifying https response

 
Vandiyadevan senthan
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

Can any one suggest me any idea or source for my task:

Task:

Using java program i need to check whether program getting response when connecting to -> https://<ip address> .,or not.This ip is nothing but a ip of a Gateway which is running as a service in server.?

If i am not getting the response from it,then i shd do some activity .

I used URL class for this?But tell me whether any other class should i use.


If anyone did the same task earlier,can u share it with me as i need it most.


Advance thanks

Kind Regards,
Anandraj
 
Jessica Sant
Sheriff
Posts: 4313
Android IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm going to move this to the Sockets and Internet Protocols forum where I think its a better fit. So please post your replies there.

In the mean time, have you tried the URLConnection class?

Also, a quick google search for URLConnection seemed to have a bunch of hits.

Good luck!
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If your URL starts with https - you will get a HttpsURLConnection. I suppose your URL could include a request for some resource like index.html, then you can look for a response code - which would probably be an error but at least you completed a request/response cycle. If there is nothing running at that URL, you should get an IOException in the call to connect().
Bill
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!