When the methods init() and Distroy() will be called?
Answers were Sorted based on User's Feedback
The servlet life cycle included init() and destroy()(Small
d).
init() is called at the beginning of the servlet,it
performs certain one time activities which are required
during the lifetime of the servlet.It may be some
initialisation of variables or a database connection.
destroy() is called to destroy the servlet.Various
resources which are held by the servlet will be
released,database connections which were opened will be
closed.Later the servlet is destroyed.
| Is This Answer Correct ? | 4 Yes | 0 No |
Answer / abhijitbaji
both init() and destroy() are called only once.
init() at the begining when servlet object is cerated.
destroy() when the servlet object is removed from server(at
shoutdown).
service() is called each time when request comes to servlet.
| Is This Answer Correct ? | 2 Yes | 1 No |
Name the webserver that is used to run Servlets?
Hi friends, am newbie to servlet. My interviewer asked why used servlet in your application. i used servlet for controller logic and business logic . is it correct ?
What is a servlet engine?
In jsp custom tags from child tags to how many levels of parent tags you can acess
Describe some assignments that are executed by servlet container?
what are binding listners?
What methodology can be followed to store more number of objects in a remote server?
What is servletconfig?
i need connection pooling code.....from harpreet.your@gmail.com
How to make servlet thread safe?
9 Answers Frisco Tech, InfoVista, WipSys Technologies,
What is the use of httpservletrequestwrapper and httpservletresponsewrapper?
I have a requirement Here we have a ResultSet object that will contain 50 records i need to print those recors in to a webpage(i.e; view according to MVC architectures that mybe servlet or jsp) . Here i need to print the records 10 per page that is 1 to 10 in page one and 11 to 20 in page two like remaining will be appeared in other pages we need to display those page numbers whenever we click on that page number we will go to that page and display 10 records like we will display 5 pages it is like this << 1 2 3 4 5 next >>