Urgent Question

    How to call URL with https protocol?  Suppose changing the protocol will be fine.
I am using JDK1.2.2

My program is as follows:

URL url = new URL     ( "https", "", 8888, "leftt1.htm"  );
URLConnection uc = url.openConnection();
uc.setDoOutput( true );
InputStream in = uc.getInputStream();

The error message is unknown protocol.
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
y are u breaking ur url in parts try giving the continuous url
URL url = new URL     ( ";
i think this should work
1. is your program an applet or an application?
2. where do you get the exception?
3. post the exception details.

This is how I do it and it works:

URL url =
  new URL(protocol, serverIP, serverPort, serverPath);

where the parameters might be initialized as follows:

String protocol = "https";
String serverIP = "";
String serverPort = "2020"; //?? your secure port
String serverPath = "/whatever/servletpath/servlet";

Hope that helps,
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.