Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

know all the context names within the web container  RSS feed

 
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: 3511
77
  • 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: 3511
77
  • 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: 3511
77
  • 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.
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!