You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Patrick Wunderlich <ne...@xkill.de> on 2005/02/25 09:16:40 UTC
Howto get Port in HttpServlet#init(ServletConfig)?
Hey Tomcat Fans,
is there a programmatically way to get the Http-Port
in the HttpServlet#init(ServletConfig) method?
Kind Regards,
Patrick Wunderlich
(Germany)
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
Re: Howto get Port in HttpServlet#init(ServletConfig)?
Posted by Bill Barker <wb...@wilshire.com>.
"Patrick Wunderlich" <ne...@xkill.de> wrote in message
news:cvmmlk$8bq$1@sea.gmane.org...
> Hey Tomcat Fans,
>
> is there a programmatically way to get the Http-Port
> in the HttpServlet#init(ServletConfig) method?
>
No, for the simple reason that the Http-Port isn't well-defined during init.
For example, if you have both a HTTP Connector and a HTTPS Connector
defined, then the same servlet will serve requests on both port 80 and port
443.
> Kind Regards,
> Patrick Wunderlich
> (Germany)
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org