Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

doGet() confusion

 
ankur trapasiya
Ranch Hand
Posts: 160
Java Netbeans IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


here this is my welcome page. When i remove the invocation of super.doGet() the servlet works fine but when i try to use it with super.doGet() browser says "HTTP method GET is not supported by this URL".
Now as far as I know the rules of overriding it is perfectly valid to call super version of doGet().
Am i missing any important fact regarding this ? can anyone please tell me what is happening here with super call ?
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65335
97
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ankur trapasiya wrote:Now as far as I know the rules of overriding it is perfectly valid to call super version of doGet().

Of course it is valid according to the language. But it will perform whatever code the super method contains, which in this case is to return a method-not-supported response.

If that's not what you want (and I can't see how it ever would be), don't do that.
 
ankur trapasiya
Ranch Hand
Posts: 160
Java Netbeans IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hmmm got you..... thanks
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic