This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
    Bookmark Topic Watch Topic
  • New Topic

override service method  RSS feed

 
Ashish Hiriadka
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Report post to moderator
I am new to the servlet. I see in the Servlet code mentioned (in another topic), service method is overriden instead of overriding doGet or doPost. can we do this? if we can override, which HTTP method we should use in jsp?
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66182
146
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Report post to moderator
Paul Clapham wrote:That's a bad practice. You should override doGet if your HTML code uses the GET method to request the servlet, and you should override doPost if your HTML code uses the POST method.


[Bear: sorry Paul, I split this incorrectly]
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66182
146
IntelliJ IDE Java jQuery Mac Mac OS X
 
    Bookmark Topic Watch Topic
  • New Topic
Boost this thread!