Hi Manisha,
As per Servler 2.1 / 2.2 specification, calling a doGet() or doPost() or any
other methods of a servlet from another servlet is considered to be insecure
and hence the methods for obtaining the reference of the servlet & other
related methods are deprecated. The suggested way is to use either Servlet
Chaining or call the servlet using the Http protocal as it happens from
outside the webserver.
Assume that Servlet1 has to invoke the doPost() (in that matter any other
Http methods) of Servlet2.
In Servlet1, an Urlconnection for Servlet2 could be taken and the request
type could be set as POST (any other depending on the method to be invoked).
Now when the urlconnection is established, the corresponding method is
invoked in the Servlet2.
Hope this helps
Regards,
Mahesh
----- Original Message -----
From: Manisha Menon <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, June 20, 2000 2:20 AM
Subject: Calling doPost() - ASAP Please.
> Hi all,
>
> Can someone tell me how to invoke doPost() method of a
> servlet from another servlet ? I think by forwarding
> using RequestDispatcher, you can only call doGet()
> method, right ? Please reply me how to call doGet()
> directly.
>
> Thank you
>
> Manisha
>
> __________________________________________________
> Do You Yahoo!?
> Send instant messages 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