Re: Obtaining reference to servlet that is instantiated by tomcat on server start up
Monday, April 1, 2002 06:24 AM
servlet is not just any plain 'ol java class. it is a request-response mechanism. so you are not to get a reference to the servlet. a reference to the servlet makes no sense given what the servlets are designed to do. what you could do is in the web.xml, define url-mapping for the servlet startServlet and then send it a request, either from the client side or from some other component using UrlConnection. that is the only thing you should be doing with the servlets - sending it a request and getting a response. no reference to servlets from other components are necessary or desireable.