• Post Reply Bookmark Topic Watch Topic
  • New Topic

override _jspService()  RSS feed

 
marlajee Borstone
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I want to know whether I can ovrride '_jspService()' method in JSP ?

thanks in regards,
dhansumaal.
 
Jigar Naik
Ranch Hand
Posts: 762
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No you can not override _jspService() method in jsp.

_ means you can not override. Dont touch me . Stay away



you can override jspInit() and jspDestroy()

[ July 15, 2008: Message edited by: Jigar Naik ]
[ July 15, 2008: Message edited by: Jigar Naik ]
 
Amit Ghorpade
Bartender
Posts: 2856
10
Fedora Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi marlajee Borstone welcome to Javaranch,
why dont you try overriding it?
although you wont be able to do so.
as said by Jigar the method is marked with a _(underscore) and hence cannot
be overridden.


Hope this helps .
 
marlajee Borstone
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Amit and Jigar for your reply.

Dhansumaal.
 
Ali Khalfan
Ranch Hand
Posts: 129
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
just out of curiosity...why isn't the jps marked final?
 
marlajee Borstone
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
this _jspService() method would be in generated _servlet class of a Jsp.
The generate servlet class implements HttpJspPage interface.And HttpJspPage interface extends JspPage interface; which interm extends Servlet interface.
Hence the generated servlet class can not be final.
Help me to improve my understanding on this if I am going wrong.



Dhaansumaal
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!