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

doubt on _jspService()

 
Bob Mathews
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Question 7 of chapter 6
_jspService() cannot be overridden
Is it that _jspService() cannot be overridden or is it that it should not be overridden

regards
Nishant
 
Narendra Dhande
Ranch Hand
Posts: 951
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I think _jspService(0 can not be overridden. If you try to override the method in the JSP page using declaration, when the JSP page translated to servlet, there will be two _jspService() methods one defined by you and another created by container, so the generated servlet can not compiled.

Thanks
[ May 17, 2006: Message edited by: Narendra Dhande ]
 
Rajkishore Pujari
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, you are right Narendra. Container creates _jspService. If you declare _jspService yourself then you will get an error during Compilation phase saying that " _jspService is already defined ". So you cannot override _jspService().
 
Nikhilesh Fonseca
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
But you can overide the same in a Servlet rt ??..Only you will have to figure out how to call goGet /doPost or someother Method..
 
Rajkishore Pujari
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes Nikhilesh
[ May 18, 2006: Message edited by: Rajkishore Pujari ]
 
Bob Mathews
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks gang
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic