It's not a secret anymore!*
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 Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "How to validate Url" Watch "How to validate Url" New topic
Author

How to validate Url

Thirumurugan Sivaji
Greenhorn

Joined: Mar 03, 2009
Posts: 20
Hi,
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: 684

Hi,

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
 
Similar Threads
Read XML output from a URL
Peculiar HTML Form INPUT Tag
FileNotFoundException Response 500
Unable to get security certificates from HTTPS Server
Class Cast Exception in HttpURLConnection