It's just a change in the way how the client and the server communicate over network with each other. This is a matter of server configuration. Just configure the server to use HTTPS instead. No changes in the code logic/flow are necessary, you only need to update any referenced absolute URL's in your webapp accordingly (in HTML links, form actions, etc). So if your form action is for example http://www.example.com/myForm.html
instead of myForm.html
and the currently opened page is not opened by HTTPS, then you need to change the form action to the HTTPS URL.
As to the server configuration, it's unclear what server you're using, so here's a Tomcat-targeted example how to configure the server to use HTTPS (SSL): http://tomcat.apache.org/tomcat-6.0-doc/ssl-howto.html. Any self-respected server ships with this information.