This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
I have a class (its not a servlet) which does profiling of a web service. Profiling can be done for diff webservices in different context. A telnet service is started on a specific port. A telnet client dumps the results. Now this port has to be different for each tomcat context. I need to know the tomcat context in which the Profiler class is loaded and pick up port number from a property file. I do not want to use a servlet for which I pass a parameter and get context(using web.xml) Is there any catalina or tomcat class which can give me the current context inside the Profiler class.