Can we call destroy method inside init method?



Can we call destroy method inside init method?..

Answer / Chandan Kishore

No, it is not recommended or allowed to call the destroy() method inside the init() method in JSP. The init() method is called when the JSP page is loaded, while the destroy() method is called when the page is unloaded. Calling the destroy() method prematurely can lead to unexpected behavior.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More JSP Interview Questions

What is difference between page and pagecontext in jsp?

1 Answers  


Can you call jsp from servlet?

1 Answers  


Explain the difference between include directive and include action in jsp?

1 Answers  


What is the difference between include and jsp directive: include action?

1 Answers  


How to get session in Jsp other than session object?

3 Answers   TCS,


Can you use javascript in jsp?

1 Answers  


Can you stop multiple submits to a web page that are initiated by clicking to refresh button?

1 Answers  


Why is _jspservice () method starting with an '_'?

1 Answers  


What are directives? What are the different types of directives available in jsp?

1 Answers  


What is the use of 'out' implicit object?

1 Answers  


What do jsp literals consist of?

1 Answers  


How does a jsp work?

1 Answers  


Categories