servlet has not any main method in it how does it work by
JVM?

Answer Posted / amit singh

no man first the constructor will run then the init()
method
which are used to intialization step likee servletconfig
then after service() method for all thread which will
create for the only on instance of servlet
what the mean is it people think that always the instance
of servlet always create when the requst for the particular
servlet but here only the one instance of servlet and the
the service method will excecute for distinct request
ao don't ever think that

note: that the constructor is default constructor you are
no able to call this constructor
so first the constructor will run
this servlet object it just a noraml object
but after the servletcofig it will be the servlet object
so the constructor will run
thanks
amitsing2008@gmail.com
amit09mca(scjp1.5 and many more)

Is This Answer Correct ?    3 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Define the struts in the j2ee framework?

503


What is j2ee stand for?

492


Why is java important for internet?

462


Why java is called robust and secure?

477


Difference between load and get method?

558






What is pure java?

525


What is java developer?

474


Define thin client?

514


What are types of j2ee clients?

504


Hi Friends. I want complete technical flow of j2ee project with following technologies. jsp , servlet , Struts , Hibernate , (should follow mvc-2 design pattern) . with DAO ,DTO SERVICE layers .

4403


What is setfocusable in java?

577


What is jbutton in java?

500


What do you understand by actionform?

482


What is the concept of connection pooling?

543


Who gave the name java?

468