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

Difference between load and get method?

737


What are the advanced technologies in java?

690


What is a component in java?

657


What are the types of j2ee clients?

705


What is data?

746


Can I run seam in a j2ee environment?

708


What is a panel java?

775


What spring is in related to j2ee?

755


Why frameworks are used in java?

687


What is a web container j2ee?

689


What is ejb container provider?

641


What is mean by j2ee?

653


Is java ee and j2ee same?

684


what is interface in java ?can you explain with simple example?and what is the difference between abstract and interface?

2293


What is setbounds in java?

727