I thought ServletContext might provide a method. Does the getAttribute() method of ServletContext provide any help i.e. is there an attribute name (maybe \"host\", \"port\")
I have found in my old project the string:
request.getHeader("host").contains("xxx")
maybe it is the solution?