Hi , I have seen a no. of codes for servlet where they have the doGet()implemented with some logic and in the doPost() has this within it doGet(req,res).Why is this required and what is its function within the code.Pls help
Hi Saahil, the doGet method processes the data if you use METHOD="GET" (the default) to submit your HTML form data. doPost processes METHOD="POST" submissions. doGet within doPost just means that independent of submission type the data will be processed by the same method. It just passes the data to the other method. Regards Torsten
Also note that the GET method is default in the case that METHOD is not specified. Doing it this way will ensure that the doPost method of the servlet will be called which is where the heart of your code should be called. It is simular to implementing a method called doWork and having doGet and doPost both doWork. You do not have to do things this way. Just a matter of style.
No more rhymes! I mean it!<br /> <br />Does anybody want a peanut?