I have an application which is using two different ports, 443 & 4443. Another is for using the application (UI) and the other is a control channel for some automated clients.
I have few different servlets configured in web.xml. First is for the UI use, for users who normally use the application through the https-443:
<servlet-mapping>
<servlet-name>application_ui</servlet-name>
<url-pattern>/*</url-pattern>
</servlet-mapping>
I also have an servlet mapped in web.xml which is only used by the clients in port 4443, let this servlet be named as "client_inlet". This is a simple listener service for POST requests and there is no functionality for users.
<servlet-mapping>
<servlet-name>client_inlet</servlet-name>
<url-pattern>/ClientInlet</url-pattern>
</servlet-mapping>
Currently users can access the both sections of application from both ports, 443 & 4443.
What I wish to achieve is that the client_inlet part of application would achievable only using port 4443 and all the 443 traffic would be redirected to the application_ui
Something like the following is what I would like to do (not sure if this is even possible syntax in web.xml but at least it does not work):
<servlet-mapping>
<servlet-name>application_ui</servlet-name>
<url-pattern>https://*:443/*</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>client_inlet</servlet-name>
<url-pattern>https://*:4443/ClientInlet</url-pattern>
</servlet-mapping>
Is the scenario even possible using the web.xml config? Or should it be done in the application server side? I'm using WildFly 8.1.0, any idea how this should be done there in standalone.xml?