Issue
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.
Solution
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.
Answered By - T.J. Crowder
Answer Checked By - Katrina (JavaFixing Volunteer)