I need to get a list of deployed webapps in Apache Tomcat. Also, for each webapp I need to get a list of initialized servlets and JSPs. Any ideas how this can be done?
I don't know how to do it. But there is a manager application in the standard distribution of tomcat, which lists the deployed apps. Sourcecode is provided, so you could have a look there.
Regarding your question about other webapps: Yes, there could be other webapps, which resides not in the webapp directory. They could be specified in the server.xml.