tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexander Shutyaev <shuty...@gmail.com>
Subject Re: force embedded tomcat 7 to listen on ALL adresses
Date Tue, 17 Jul 2012 10:42:36 GMT
Ok, I've figured out it DOES listen on ALL addresses no matter what
hostname is, but somehow requests only succeed if they have the hostname
matching with the one set by Tomcat.setHostname(...) (which is localhost by
default). I'm not sure where the requests fail, but they do.

2012/7/17 Alexander Shutyaev <shutyaev@gmail.com>

> Hi all!
>
> I've embedded tomcat 7 using org.apache.catalina.startup.Tomcat class. It
> seems that by default it listens on "localhost". I've noticed there is a
> method org.apache.catalina.startup.Tomcat.setHostname(String) which I can
> use to change this. But I can't find how I can tell tomcat to listen on ALL
> addresses. I know how to do this in server.xml (just omit the address
> attribute in connector), but as new embedded tomcat does not use config
> file I'm not sure how to achieve this. Can anyone help me?
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message