I have an EAR application having structure like,
abc.ear
The application is running fine on a Wildfly server separately as,
I want to redirect all the HTTP (Port 8080) requests to the HTTPS (Port 8443).
Any help is heartily appreciated.
If I understand correctly, you have a webapp packaged in an EAR file. So you could add this in webapp web.xml:
<security-constraint>
<web-resource-collection>
<web-resource-name>everything</web-resource-name>
<url-pattern>/*</url-pattern>
</web-resource-collection>
<user-data-constraint>
<transport-guarantee>CONFIDENTIAL</transport-guarantee>
</user-data-constraint>
</security-constraint>
Thus if a user access your application from its browser using http://..., it will be "redirected" to https://...
Note: You have also to configure SSL in Wildfly security-realms but I assume you already did it