Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

doGet() doPost()  RSS feed

 
sandeep Talari
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello friends, I had dought in doGet doPost.When client (browser) sends request in the form of post (http method post) what happens if didn't override doPost() but you have overriden doGet()or viceversa please explain me.
 
winay Kumar
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi sandeep,

you will get error.If you override any HTTP methods that means your servelet will supports only those methods, if you want to support both the methods override doGet() method by keeping business logic and override doPost() by giving call to doGet() method.
 
sandeep Talari
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks pal satisfied ,
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!