How to create a form that use HTTPS?

Hello!

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="https://192.168.0.1/int_2/SessionSecureCookies_4d" 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
Fredrik

BTW
when I set a cookie I do it like:

Cookie cookie2 = new Cookie("int_2_name_secure", (String)form.get("cookie_value"));
cookie2.setMaxAge(10800);
cookie2.setSecure(true);
response.addCookie(cookie2);

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

TimYatesCommented:
> 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 http://www.fawcette.com/javapro/2002_04/online/servlets_04_23/ is an example of cookie checking :-)
0

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
JSP

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.