If you want a servlet to take the same action for both GET and POST request, what should you do?

Simply have doGet call doPost, or vice versa.

Showing Answers 1 - 1 of 1 Answers

sharad

  • Jul 23rd, 2006
 

well in this case simply type in the functionality in either of doGet/Post and then declare doGet/Post whichever is not declared previously and copy paste the same above functionality in it and tadaa...Your servlet is ready to take any request irrespective of the method type.thanx

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions