Your on the right path. Instead of multiple connectors though, you need to setup multiple services with a single connector on a different port. You will end up with essentially two web roots and applications under each.
Chris Berthold IT Systems Analyst Commercial Refrigerator Door Company 941 . 371 . 8110 x 205 -----Original Message----- From: Nikita Tovstoles [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 03, 2006 1:51 PM To: Tomcat Users List Subject: how to configure servlets within same webapp to listen to different local ports? Hi, I have a webapp with two servlets: LoginServlet and AdminServlet. I would like LoginServlet to only respond to requests coming to port 8080, and AdminServlet to respond to requests coming only to 8081. The only (rather non-portable way of doing this) of which I can think so far is: -in server.xml define two Connectors: for port 8080, and port 8081 -in LoginServlet's processRequest() do: if (request.getLocalPort() != 8080) { //abort } -Implement similar 'if' statement in AdminServlet but using '8081'. -I can move actual port numbers into web.xml as properties, but that is still not very portable. This is OK, but is there any way to do this without specifying port numbers in the webapp itself? thanks -nikita --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
