1)can we declare constructor in servlet 2)how to do FTP using Servlet-give some code examples 3)how servlet is calling init() method since it is not a Static method,it is calling directly
regards
jaigurudev
smitha verghese
Ranch Hand
Joined: Jun 21, 2003
Posts: 42
posted
0
1)can we declare constructor in servlet Its not possible to have a constructor since life cycle of a servlet is design having init, service and destroy
It is most certainly possible to have a constructor. it's just not a good idea to try to use it to perform any initialization because the base class will call the init() function when it is ready for you to perform your servlet-specific initialization (making constructs like ServletConfig available).