Try ServletRequest.getLocalPort() rather than getServerPort().

Yes exactly, thanks - that is an addition to the api after the book I read :)
eclipse auto-complete and the sun website is your friend :)

*****

Part of all these questions is I am looking to implement a servlet subclass which will "auto register" itself with an upstream front end (maybe AJP does this?) so ideally I would want to be able to query what URI "host,port,path" would access the proper connector and servlet when it's "init()" is called so I can pass it to upstream to the front-end router. Of course at this time no request has been recieved. I guess I could do it by parsing the server.xml or putting in rendundant per servlet initParameters but that makes me queasy, I like the thing itself to propagate it's own state changes :)

PK

At 11:58 3/13/2007, you wrote:
> From: Caldarale, Charles R [mailto:[EMAIL PROTECTED]
> Subject: RE: Can one map a servlet to a specific connctor?

Try ServletRequest.getLocalPort() rather than getServerPort().



---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to