If I was U I would look a little closer on RequestDispatcher - in Servlet
ver 2.2

[EMAIL PROTECTED]


-----Original Message-----
From: ??? [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, August 22, 2000 6:17 PM
To: [EMAIL PROTECTED]
Subject: i wanna invoke other Servlets in my Servlet source ....Help
me...


i made three Servlet program...
One is executed when Client invoke doGet method.....you know...
In this servlet it invoke other Servlet's doGet() method...so two servlets
share HttpServletRequest and HttpServletResponse..
is this possible?
Some books about servlet metioned this skills Interservlet Communications.
Now this is the Text in Book.

public class SomeServlet1 extends HttpServlet {
    ....
   doGet(HttpServletRequest req, HttpServletResponse res) throws ....
  {
        #1;
       #2;

       ServletContext context = getServletContext();
       Servlet servlet = servlet.getServlet("SomeServlet2");
       Method doget = servlet.getClass().getMethod("doGet", Class[]);
        // Class[] means parameter type class
       doget.invoke(servlet, Object[]);
       // Object[] means parameter instance array.
      .....
  }
}

According to above source.....invoking other method is successfully done...
i tried this way....so i added .this line.
"
Class[] clss = new Class[2];
clss[0] = req.getClass();
clss[1] = res.getClass();
"
and this too.
" Object[] objs = new Object[2];
  objs[0] = req;
  objs[1] = res;  "

So i duplicated Class[] to clss variable and Object[] to objs.
But i cannot see success messages.
The only thing i saw is "cannot find doGet method".

How can i make this successfully.........doing....???

___________________________________________________________________________
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

___________________________________________________________________________
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