At 02:46 PM 4/1/99 -0600, you wrote:
>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?

Why not have your real servlets pass in their ServletContext when they
invoke methods on your special funcationality module?

Regards,
Bob

___________________________________________________________________________
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