How to create a form that use HTTPS?


I need to get some secure cookies from a browser when a user push a button at a form. But how do I tell the form to use HTTPS?

Is this a common solution:

<form action="" method="post">

or is should a give the form some other argument?

When I use the above the browser says that it can not create a connection to the server. But perhaps I need to install some certificate at the server?

I use webserver orion 2.0.2 so if any one could give some clues it would be great!

Best regards

when I set a cookie I do it like:

Cookie cookie2 = new Cookie("int_2_name_secure", (String)form.get("cookie_value"));

Is there some method that can tell me if it is possible to set cookies like isCookiesEnable() ... I have not found any?
Who is Participating?
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.

> Is this a common solution:

I think so...  But a more common way of doing it is to have the page that the form is posted from being on https too

that way, the user can see that the page is encrypted before they post their data (a page asknig for important details that is not on https is likely to be not used)

And is an example of cookie checking :-)

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
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.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.