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.
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With