I'd like to find out the servlets running on a server. For versions prior to Java Servlet API 2.0, these methods worked, but now they are deprecated "with no replacement". Could someone give me another ideea concerning this issue?
Hallo Lucian,
I think I have some bad news for you.Soon you will have no chance of getting servletnames by that method,because as far as I know this methods will return an empty enumeration on the latest version of JVM.
The reason is security.The methods still reside in order to preserve your classes to be compiled succesfully.
Salih Sipahi
Software Engineer.
City of Istanbul Turkey
s.sipahi@sahinlerholding.com.tr
You could always utilize the init() and destroy() methods of HttpServlet, so that when a Servlet is loaded (ie is running) it writes a message to a file (or somewhere), and when it is destroyed (ie not running) it also appends a message to this file - then you will be able to see what is running and what is not ...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.