how a servlet is instantiated, whether the container calls
init() or by calling any other method? please somebody reply..
Answer Posted / ashutosh
Servlet is instantiated by servlet container by calling
method Class.forName(Servlet class name).newInstance();
First of all Servlet Container looks into the
deployment descriptor(web.xml) .It looks the definition of
Servlet.And Than instantiate it by calling
Class.forName(Servlet class name).newInstance();
Is This Answer Correct ? | 19 Yes | 5 No |
Post New Answer View All Answers
What exception should be thrown when servlet is not properly initialized?
What are the different session tracking techniques?
What are the different types of servlets?
What is a web application and what is it’s directory structure?
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 >>
What is the major difference between servlet and applet?
Why doesn’t a servlet include main()? How does it work?
How to get the actual path of servlet in server?
What do you mean by chaining in servlet?
Define the servlet mapping.
Explain servlet life cycle?
What is difference between cookies and httpsession?
What are the advantages of cookies?
How can we upload the file to the server using servlet?
Explain the war file?