Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

override _jspservice method  RSS feed

 
Neo Striker
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All
This is an interview question. Is it possible to override _jspservice method . If yes do give a small example

Regards
Rakesh
 
Amitesh Gupta
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, Yes It is possible 2 override _jspService() method in JSP . But one should always try 2 avoid it.
Generally thing performed by this method may be like Initialization of some critical data str , making data str. etc.
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello to you both, welcome and thanks for contributing!
I'll echo the reply: it is possible but not recommended. I'll even go a step further and say it is a bad idea. The way that a JSP engine turns JSP into a Servlet is vendor specific, and might require some specific code to be generated there. If you override _jspservice you are likely to get into trouble and it almost promises to be more trouble than it's worth.
(on a side note, please try to reduce contractions like '2' and 'str'. Taking the time to write what you mean reduces confusion, and makes it easier if English is not the reader's first language)
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!