Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

from http to https

I have a simple web app: a web page with a form to submit, and a servlet on the server side.

It works.

I am now asked to change it so that the address of the form changes from
http://www.example.com/myForm.html to https://www.example.com/myForm.html

What are the steps to do this? Do I have to change my servlet? My deployment? My web page? All of them?

Thanks.

like image 533
Chez Avatar asked Feb 27 '23 04:02

Chez


2 Answers

Just your deployment, not your servlet. It's a matter of configuring your web server to use HTTPS (HTTP over SSL) rather than HTTP (cleartext HTTP) to serve the page.

That configuration change should have no effect on your servlet whatsoever, provided your servlet doesn't have absolute (rather than relative) links to itself, but you wouldn't do that anyway. :-)

More about HTTPS here. The details of the configuration will depend on the web server you're using.

like image 92
T.J. Crowder Avatar answered Mar 02 '23 23:03

T.J. Crowder


The servlet container has to be configured to deliver the contents encrypted. Here is how to to do that on Tomcat. If you use another servlet container please add that information to your question.

like image 28
Mnementh Avatar answered Mar 03 '23 01:03

Mnementh