Hi all,

   I have written a service servlet that other servlets can invoke to perform
special functionality.  I chose to write it as a GenericServlet and not just as
a regular class so that I can use the log() feature to examine my jserv.log file
in Apache (we all know how painful it is to debug run-time problems with
servlets)....  anyway, I use (from Hunter)

MyServlet servlet = (MyServlet)getServletContext().getServlet("MyServlet");

in the calling servlet to grab a handle to the service servlet, it compiles
fine, but I get a run-time error ClassNotFoundException in Jserv.log.
So, obviously I need to force the webserver to instantiate the service object
prior to using getServlet.... HOW do I do this?

I am still a novice with servlets... If there is a more appropriate way entirely
different that this, please let me know!

PS  I am working under the assumption that once I get the handle to the service
object that I can invoke it's methods and pass and return objects between the
two.

Steve Dietrich
PG&E Energy Trading

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to