i am running a web server lets say tomcat at 8080 ... i want to listen to that port and find out the clients details like ip,port,protocol but when i try to listen to that port its giving me bind exception ... can pls help me out... thank u
Only one listener can bind to a port at any time. In your case that listener is Tomcat. You can either write a proxy server to intercept requests (i.e. listen to port 8000, have people connect there, get their information and forward requests to port 8080) or work within Tomcat's framework. It's a pretty full-featured web server. I'd be surprised if you couldn't log that information for every request.