The method

"public abstract Servlet getServlet(String) thows ServletException" of
ServletContext class receives the name of the servlet you want make a mehod
call as parameter. After succeed this call (not throwing ServletException)
you must cast the retrieved object to your Servlet type.

doPost(...,...) {

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

}

regards,
marcelo damorim.

----- Original Message -----
From: arun prakash <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, February 16, 2000 1:08 AM
Subject: How can i call a servlet method from another servlet


> Hi !!,
>
>    I need some help out from u guys. How can i call a
> specific servlet method from another servlet. Any
> suggestion will be extremely helpful and a code would
> be the best way to help me out.
>
> Thanks in advance.
> arun prakash
>
> __________________________________________________
> Do You Yahoo!?
> Talk to your friends online with Yahoo! Messenger.
> http://im.yahoo.com
>
>
___________________________________________________________________________
> 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