wood burning stoves
The moose likes Java in General and the fly likes How to validate Url Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Introducing JavaFX 8 Programming this week in the JavaFX forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "How to validate Url" Watch "How to validate Url" New topic

How to validate Url

Thirumurugan Sivaji

Joined: Mar 03, 2009
Posts: 20
I have validated url that starts with http:// using

but, How to validate url that starts with https://, when I give https:// format exception occurs that certificate is required. How to do that?.

Thanks in advance

Warm Regards,

Thirumurugan Sivaji

Nishan Patel
Ranch Hand

Joined: Sep 07, 2008
Posts: 689


This format exception is not because of your URL change from http:// to https://. This is because you have to make url connection without declare method. you have to specify using which method Get or Post you want to make connection with that URL. I give you brief idea about how you make connection. currently I am also use same connection. i don't have change code for http:// to https:// change url.

it looks like this. this will make connection.

Thanks, Nishan Patel
SCJP 1.5, SCWCD 1.5, OCPJWSD Java Developer,My Blog
I agree. Here's the link: http://aspose.com/file-tools
subject: How to validate Url
It's not a secret anymore!