I want to be able to deploy a .war file and detect which port the application is being served on. I have two grails' apps running within different tomcat instances, and ideally I would like to adapt the configuration of each app according to each specific tomcat instance. Each tomcat instance uses a different port, therefore detecting the port upon which the app is served means the app knows which tomcat instance the app is running in.
Thanks for any help!