-- Charles Canning <[EMAIL PROTECTED]> wrote: >Bernie Bernstein wrote: >> >We are trying to get the port information about specific instances of >> >JServs running with load balancing. We have one Apache to N JServs. It >> >appears that the "normal" means of obtaining the port always returns the >> >port of the first JServ. If anyone has some information that may help, I >> >would really appreciate it. >> >> Are you trying to get the port information from within a servlet or from >> the apache module? What is the "normal" means of getting the port? >The normal means is: > >HttpServletRequest getServerPort(); > >So, I guess I am trying to get the information from within a servlet. I think I get it. I've recently discovered what may be a completely unrelated problem, but it is related to getServerPort(). It seems that getServerPort() returns the http port that Apache is using to deliver the JServ page which is probably as expected, but not entirely useful from the Servlet context. What I would like to receive from that is the port that the user thinks he or she is hitting when viewing the page. In other words, I may be running my servers on port 8000, with a load balancer making them look like their on port 80. The getServerPort() method will return 8000 which is correct; but if I tell the user to connect to me on port 8000, it will fail since the real path to me is on port 80. I'm guessing your problem is a little different in that you want to find out which port Java is using to listen to AJP, is that correct? I don't know how to do that from within a servlet, but with some changes to JServ it could be possible, but probably not a standard thing for servlets to be able to do. Am I somewhat correct in identifying your problem or are you looking for something else? Bernie Bernie Bernstein Talk City Inc. voice: 408-871-5320 Join the Conversation. email: [EMAIL PROTECTED] http://www.talkcity.com/ -- -------------------------------------------------------------- To subscribe: [EMAIL PROTECTED] To unsubscribe: [EMAIL PROTECTED] READ THE FAQ!!!! <http://java.apache.org/faq/> Archives and Other: <http://java.apache.org/main/mail.html/> Problems?: [EMAIL PROTECTED]
