Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

Is it better to have lots of methods to my servlet, or to keep the code inside the doGet or doPost method?

code lots method methods servlet
0
Posted

Is it better to have lots of methods to my servlet, or to keep the code inside the doGet or doPost method?

0

Author: Sushil Srivastava (http://www.jguru.com/guru/viewbio.jsp?EID=744298), Feb 21, 2002I would recommend logically splitting your servlet class into methods rather than putting everyting within one method. Putting everyting in one method smells of structural programming.For e.g not much point in adding database related connection into doPost.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123