I think this is going to require a network trace using a tool like Wireshark to understand what is happening when you attempt to connect to your application.
Port 8080 will either be available or not availble - it is not going to be selectively available based on the context you are going to. From your description the first thing I would be suspecting is some form of redirect on connecting to the web app and somehow the wrong address is being sent in the redirect which is why the browser subsequently can not connect. A network trace will reveal exactly what is happening during the communication with the server.