• Post Reply Bookmark Topic Watch Topic
  • New Topic

servlet trivia

 
Shaan patil
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,


Can we call destroy method from doGet() method and viceversa?

What are the consequences?

Regards
Shaan
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65516
105
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please be sure to take the time to compose descriptive subjects for your posts; read this for more information.

You can go back and change your post to add a more meaningful subject by clicking the .
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65516
105
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This question seems to get asked about once a week.

The answer is: yes, it's just a method like any other so why would you not be able to call it? It has no other effect on the servlet. And why would you do something so ridiculous?
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You might want to peruse this FAQ entry: http://faq.javaranch.com/java/ServletsFaq#lifecycle
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!