***Considering that you already enable SSL with proper certificate.
To auto redirect all of your webserver requests from http to https just paste the following to your tomcat installation folder\conf\web.xml file and restart the service.
<security-constraint>
<web-resource-collection>
<web-resource-name>Protected Context</web-resource-name>
<url-pattern>/*</url-pattern>
</web-resource-collection>
<!– auth-constraint goes here if you requre authentication –>
<user-data-constraint>
<transport-guarantee>CONFIDENTIAL</transport-guarantee>
</user-data-constraint>
</security-constraint>
Now browse http://localhost and it will automatically go to https://localhost , for example.



