Arnaud:

If you have parameters that you picked up in the first servlet that you want to
use in the second servlet, then you should probably be using the
RequestDispatcher object (instead of simply redirecing the response). (Please
see these archives for more on this if necessary. There's discussion and code
about when the doGet() and doPost of the second servlet is executed.) That said,
you can always call the doPost method from the doGet method: have you tried this
(sorta obvious!  :-)) solution and there's some special reason this is not
viable?

Geeta

Arnaud D wrote:

> Good evening people,
>
> How can I redirect from servlet A to servlet B, but in servlet B I want the
> doPost() method to be called not the doGet.
> Unfortunatly the response.sendRedirect("/servlet/servletB"); will call the
> doGet method...
> I have the same problem with frames. If servlet A is in the bottom frame,
> how can it sendRedirect to the top frame ???
>
> My workaround is to create a servlet that has the doGet method like the
> doPost method of servlet A, and to stop using frames (wich is good IMO), but
> I want to make sure that i'm not missing out on something clever.
>
> Thank you for your time.
>
> Arnaud "go to bed now" Dostes
>
> ___________________________________________________________________________
> 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