This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes Tomcat and the fly likes Help- Tomcat - getting current Context Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Products » Tomcat
Reply Bookmark "Help- Tomcat - getting current Context" Watch "Help- Tomcat - getting current Context" New topic
Author

Help- Tomcat - getting current Context

shubhra dabral
Greenhorn

Joined: Feb 05, 2003
Posts: 1
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.
Matthew Phillips
Ranch Hand

Joined: Mar 09, 2001
Posts: 2676
I am moving this to the Tomcat forum.


Matthew Phillips
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: Help- Tomcat - getting current Context
 
Similar Threads
InetAddress, Socket
Can service class be accessed directly?
access tomcat on LAN
Different flavors in MyEclipse
Profiler for a web app running on Tomcat