I recently enabled HTTPs in my projects by adding following lines in web.xml
<security-constraint>
<web-resource-collection>
<web-resource-name></web-resource-name>
<url-pattern>/*</url-pattern>
</web-resource-collection>
<user-data-constraint>
<transport-guarantee>
CONFIDENTIAL
</transport-guarantee>
</user-data-constraint>
</security-constraint>
As the result all the http request will be redirected to same URL using https (
LINK)
And this is working fine in expected manner.
I have modified code of mobile apps to send https requests.
But I dont need http request to be redirected using https.
(In order to support apps which are still sending http request.
i.e. http request from devices on which the users are still running old version of app)