Hi,
I have written this code in the service method of one servlet to call a
public method of another servlet, YourServlet.

        String s1;
        ServletContext sc = getServletConfig().getServletContext();
        YourServlet y1 = (YourServlet)
sc.getServlet("http://itl_pc_4478/servlet/pc.YourServlet");
        if(y1 != null)
                // getInfo() is a public method of YourServlet
                    s1 = y1.getInfo();
            else
                s1 = "Second Servlet not found !";

But when i run this, I get "Second Servlet not found!"

Any type of help is welcome.
Thanx in advance.


Punam Chordia
Software Engineer
ITL Infosys, Pune.
Ph. 91-020-647420/1 Extension: 1046

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html

Reply via email to