Syed:

I went back and read your original note.. Correct me if I am wrong, but it seems
that you want to call the servlet CPP from the servlet PostToCallParser. I think
what you need to do is use the RequestDispatcher. Since both the above servlets
live in the same server,
RequestDispatcher rd = sc.getRequestDispatcher("/servlet/CPP");
should do the trick. Just remember, if you call the requestDispatcher from the
doGet of the PostToCallParser, it is the doGet of the CPP that is executed. And
similarly for the doPost. Also make sure you have not committed anything to the
browser (via the CPP) before you make this call.

Geeta
P.S. See the API docs and these archives for info and code examples on the
RequestDispatcher.

Syed Mahmoods wrote:

> Geeta,
> You are correct, I have the doGet method implemented in the CPP.  The doPost
> just calls the doGet.  The basic problem of FileNotFoundException still
> remains.
> Syed
>
> -----Original Message-----
> From: A mailing list for discussion about Sun Microsystem's Java Servlet
> API Technology. [mailto:[EMAIL PROTECTED]]On Behalf Of
> Geeta Ramani
> Sent: Wednesday, August 02, 2000 2:22 PM
> To: [EMAIL PROTECTED]
> Subject: Re: servlet servlet FileNotFoundException
>
> Syed:
>
> Sorry if I say something you already know, but it seems as if you are a bit
> confused.
>
> If you want code within a doPost method to get executed, you must have a
> form
> whose "ACTION" attribute is "POST" and whose "METHOD" attribute has value
> "/servlet/servletName". In which case, a "submit" via the form will result
> in
> the doPost method of the servlet with name "servletname" to be executed. All
> the
> form values (including hidden ones and queryString vars) are available then
> in
> your oPost via the getParameter methods. When you call the servlet
> "directly" as
> in the url you have below, the doGet method is executed.
>
> Geeta
>
> ___________________________________________________________________________
> 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

___________________________________________________________________________
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