You are viewing a plain text version of this content. The canonical link for it is here.
Posted to general@jakarta.apache.org by Georgiy Vasilyev <Ge...@miratech.com.ua> on 2000/08/06 19:05:52 UTC

host name and port number

Hi all,

Is it possible to get a host name (ip address is OK) and web server port
number (servlet runner port is OK)  runtime 
(using servlet runner api only)?

Is it possible to open a listening stream socket inside a servlet?

Unfortunately I could not find ways of performing such things myself

Thanks,
Georgiy


Re: host name and port number

Posted by Thor Heinrichs-Wolpert <th...@echidna.net>.
host name and port numberThese are in the Servlet API documentation.  I
suggest you download it from Sun, or get a Servelet book.

req.getServerName();
req.getServerPort();

I haven't built a listener, but there are RMI implementations using
Servlets, so it can be done.  I think there is an example of this on Jason
Hunters website.

Thor HW
----- Original Message -----
From: Georgiy Vasilyev
To: 'general@jakarta.apache.org'
Sent: Sunday, August 06, 2000 10:05 AM
Subject: host name and port number


Hi all,
Is it possible to get a host name (ip address is OK) and web server port
number (servlet runner port is OK)  runtime
(using servlet runner api only)?
Is it possible to open a listening stream socket inside a servlet?
Unfortunately I could not find ways of performing such things myself
Thanks,
Georgiy