Win a copy of Mesos in Action this week in the Cloud/Virtualizaton 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
Bartender
Posts: 2803
41
  • 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
Bartender
Posts: 2803
41
  • 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
Bartender
Posts: 2803
41
  • 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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic