servlet has not any main method in it how does it work by
JVM?
Answers were Sorted based on User's Feedback
Answer / srinivasa kumar meda
The life cycle of a servlet is controlled by the container
in which the servlet has been deployed. When a request is
mapped to a servlet, the container performs the following steps.
If an instance of the servlet does not exist, the Web container
1. Loads the servlet class.
2. Creates an instance of the servlet class.
3. Initializes the servlet instance by calling the
init method.
Invokes the service method, passing a request and response
object.
Is This Answer Correct ? | 24 Yes | 1 No |
Answer / ananth
Servlets has init() method to load the initial steps for
loading servlet instance in the server class path at the
first time of the servlet engine has starts.
Is This Answer Correct ? | 17 Yes | 1 No |
Answer / suresh
plese put the correct answers dont say rong number peoples was visiting ths site dont say stupid answers
Is This Answer Correct ? | 14 Yes | 7 No |
Answer / nishita
The request mapping is done in web.xml which maps URL to
the Servlet which should handle the request. When the user
hits the URL on the browser, the request is redirected to
Webserver from the code. The Web container decides which
Servlet to call based on the mapping in Web.xml. This
servlet (if it was not loaded at server startup) will first
get loaded then, it gets instantiated and then its init()
method is called. This is called only once. The
initialization happens here. After that the servlet is
ready for service, service() method is called. The service
() method can be called any number of times. Hence, without
a main method the servlet is called.
Is This Answer Correct ? | 6 Yes | 0 No |
Answer / sk.bilal ahmed
Servlets has work by init() method to load the initial
steps for loading servlet.
Is This Answer Correct ? | 4 Yes | 2 No |
Answer / psreddy
whenever send a request for any resource , First the
webcontainer will recieves the request and after it will
create two objects that objects are request and response
objects then it will match the url pattern in web.xml ,
afer that it creates Servlet Object .
Is This Answer Correct ? | 2 Yes | 1 No |
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 |
Which compiler is used in java?
What is javaserver pages (jsp)?
Who generates bytecode in java?
Describe the file types *.ear, * .jar and *.war?
Are java primitives objects?
What is deployer?
What is java application server?
What do you understand by connector? Explain connector architecture.
CANDOR Services, a leading provider of next-generation staffing services, draws from unparalleled resources and expertise to offer you innovative, quality workforce solutions. We have openings for "J2EE ARCHITECT" with one of our clients. Client is CMM Level 5 company. Location : Hyderabad Roles A J2EE Architect with expertise in Web Architecture (covering Spring MVC, AOP, Webflow, Struts, Tiles, Hibernate, JAAS, Web Application Performance Turning & Measurement) as part of Solutions Architecture Group: Position involves in providing architectural vision, conceptualize and provide architectural approaches, create models and specifications, and validating the architecture against requirements and assumptions. Also involves in providing oversight over ongoing projects as a reviewer and auditor Educational Requirements A minimum of BS or MS (MS preferred) in Computer Science or Engineering or equivalent experience in the IT industry. Skill Sets Overall 8-10 Years of experience in IT industry with 3-4 Years of experience in Service industry Technology Skills Java, J2EE, MVC Frameworks (Struts/WebWork/JSF/Spring), Spring, AOP, WebFlow, ORM Tools (Hibernate/Ibatis/JDO/Tapestry), App servers, Databases, JAAS Web Application Performance Tuning & Measurement 6+ years Java software development experience. 4+ years of enterprise Java development, with emphasis on web-based applications. Strong relational database and SQL skills (5+ years). Mail to : anuradha.k@candorservices.co.in
what is external varibles in jsp?
Describe action form?
how to run servlet program between two computer through internet ?