For some reason i want to specify port setting here
so can you please tell me is there any markup available to mention port here
<security-constraint>
<web-resource-collection>
<web-resource-name>securedapp</web-resource-name>
<url-pattern>/*</url-pattern>
</web-resource-collection>
<user-data-constraint>
<transport-guarantee>CONFIDENTIAL</transport-guarantee>
</user-data-constraint>
</security-constraint>
I think there is no chance.
Adding listeners to ports is the duty of the container. The container configuration can be changed and then what should your web application do then? E.g. if the container changes the port from 8443 to 9443 your application would be broken.
So in your web application there is no way to define the port (it’s out of scope of the web application).
BTW why do you want to fix the port in your web application?