I would like to construct, in a servlet's init() method, the URL by which this servlet will be accessed, at least up to the name of the web-app.
For instance, if I have set up to access the webapp as http://www.me.com:8080/myapp/ I want to end up with: String protocol = "http"; String hostname = "www.me.com"; int port = 8080; String path = "myapp"; Protocol I can assume is http. Hostname I can get using InetAddress.getLocalHost().getHostName() How can I get the port and the path? Thanks for your suggestions... -- bob ---------- Robert Herold Cotagesoft, Inc. 650 474 9013 x808 -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>