Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

know all the context names within the web container

 
lakshmana dhanimireddi
Greenhorn
Posts: 18
Java Netbeans IDE Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How can we know all the context names or all the web app names with in the web container in a servlet?
 
Tim Moores
Saloon Keeper
Posts: 3275
57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You could use the JMX API, like the Management web app or PSI-Probe do for Tomcat. I'm sure other servlet container offer similar functionality.
 
lakshmana dhanimireddi
Greenhorn
Posts: 18
Java Netbeans IDE Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
But i don't want to use the apis otherthan servlet api.

Is there any way to solve this problem using servlet api.

thank you for your reply.
 
Tim Moores
Saloon Keeper
Posts: 3275
57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
But i don't want to use the apis otherthan servlet api.

Why not?

JMX is the API to find out stuff like that. It's also part of the JSE, if -for some reason- that's your concern.
 
lakshmana dhanimireddi
Greenhorn
Posts: 18
Java Netbeans IDE Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you tell me how?
 
Tim Moores
Saloon Keeper
Posts: 3275
57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'd check out the PSI-Probe source code; obviously it has code that does this somewhere in it.
 
lakshmana dhanimireddi
Greenhorn
Posts: 18
Java Netbeans IDE Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I also tried but i can't find out.
 
A feeble attempt to tell you about our stuff that makes us money
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!