Hi all,
I'm using this way to list the deployed applications throw jsp. can anyone tell me if
there is a better way to do that(without substring because that might cause some
errors):
Registry registry=Registry.getRegistry();
MBeanServer mBeanServer =Registry.getRegistry().getServer();
java.util.Set set = mBeanServer.queryNames(new
ObjectName("Catalina:type=Manager,*"), null);
java.util.Iterator it = set.iterator();
while (it.hasNext()) {
String kunde=it.next().toString();
kunde =
kunde.substring((kunde.indexOf('/')+1),(kunde.lastIndexOf(',')));
}
the substring() catches only the name as for example:
Catalina:type=Manager,path=/helloweb,host=localhost
will list "helloweb"
Thanks.
Younes
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]