Isn't servlet container, such as tomcat sufficient for you ?
It would be easier to be spec compliant when deploying on servlet
On application server you cannot open custom ports.
If you still want to do it on application server
can be helpful.