Hello,
I wrote a simple thing.Taking two textbox values and dispalying them .Any code i write in doget() and doPost() dont work,but in the processRequest() method it works.I can see the values in the url when i use GET.
Hi..Lifecycle of a servlet has 3 methods
(1)init()
(2)service()
(3)destroy()
Whatever main logic we have in servlet we write it in the service() method..........Now i think you are using the Netbeans IDE for writing servlets program..........Now in Netbeans IDE there is no service() method but an processRequest() method..............i.e. service() is equal to processRequest()...............
Now whatever method you have chosen to pass data i.e. Get or Post from these method the service() method is called............i.e. in Netbeans from the from the doGet() method and doPost() you can see a call given to processRequest() method (this you will find at the bottom of the code, while creating servlets)...............
You also said that when i write code in doGet() or doPost () it doesn't executes then you might be doing some mistake because i have tried this and it works