PDA

View Full Version : forwarding to servlets problem


conwaypm
02-24-2009, 01:12 AM
My apologies if this is a noob question that's been asked a lot of times but I havn't been able to find the answer to the specific problem I have..

I have two servlets; /Login and /ShoppingCart

I make a POST request to the login servlet. The post method of the login servlet does some username-userpassword checking on the database and if successful, forwards the reqest onto the shoppingcart servlet.

I've been using the RequestDispatcher.forward(request, response) method to forward the request onto the shoppingcart servlet but it keeps going to the POST method of the shoppingcart servlet (I want to forward to the GET method).

I've seen a few solutions to this problem and it seems to be to just call the 'doGet' method in the doPost method but I cannot do this as I have an implementation for the POST method.

Can anyone point me to a solution to my problem? Thanks in advance :D

shyam
02-26-2009, 06:03 PM
I've seen a few solutions to this problem and it seems to be to just call the 'doGet' method in the doPost method but I cannot do this as I have an implementation for the POST method.

if i get that right...you haven't implemented the doGet method but you still want to call it anyway?