Forums Register Login

Basic reason

+Pie Number of slices to send: Send
In JSP, there are three fuctions init,destroy and service
The first two init(), destroy() methods can be handled by the page authors. But not the last one service() method why?
Thanks in advance.
+Pie Number of slices to send: Send
Hi Somasundaram,
The three functions which u were talking about are known as life cycle methods of jsp page.
You use the jspInit method to initialize any variables, and you use the jspDestroy method to free the resources ur jsp using. The service method is important and it is automatically generated by the jspcompiler. The service method contains all the translated code (The html,Scriptles,Directives e.t.c). So if u try to overwrite it, then ur program will not behave like what ur expecting from it.
I think u find this info useful.
Bye
Loke.
+Pie Number of slices to send: Send
Hi Lokash Reddy,
Thanking u for the kind explanation for my question.
I've been selected to go to the moon! All thanks to this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 586 times.
Similar Threads
call detroy in init
service() in HttpServlet
what happens if i call destroy() method in init() or service() method ?
how server will know ?
what are container callback methods??
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 29, 2024 07:04:40.