ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
tip       Ask Questions on ANYTHING, that arise in your Daily Life at     FORUM9.COM
Google
 
Categories  >>  Software  >>  Java J2EE  >>  Java Related  >>  Servlets
 
 


 

 
 Core Java interview questions  Core Java Interview Questions
 Advanced Java interview questions  Advanced Java Interview Questions
 Swing interview questions  Swing Interview Questions
 EJB interview questions  EJB Interview Questions
 Servlets interview questions  Servlets Interview Questions
 Struts interview questions  Struts Interview Questions
 JDBC interview questions  JDBC Interview Questions
 JMS interview questions  JMS Interview Questions
 SunOne interview questions  SunOne Interview Questions
 J2EE interview questions  J2EE Interview Questions
 Weblogic interview questions  Weblogic Interview Questions
 Websphere interview questions  Websphere Interview Questions
 Java Networking interview questions  Java Networking Interview Questions
 Java J2EE AllOther interview questions  Java J2EE AllOther Interview Questions
Question
Which method the Servlet container call to create the 
instance of the servlet?
 Question Submitted By :: Stalin
I also faced this Question!!     Rank Answer Posted By  
 
  Re: Which method the Servlet container call to create the instance of the servlet?
Answer
# 1
servlet container creates the init() method
 
Is This Answer Correct ?    3 Yes 0 No
Priyanjan
 
  Re: Which method the Servlet container call to create the instance of the servlet?
Answer
# 2
Servlet container invokes the init() method to create the 
instance of servlet.
 
Is This Answer Correct ?    3 Yes 0 No
Priyanjan
 
 
 
  Re: Which method the Servlet container call to create the instance of the servlet?
Answer
# 3
servlet container calls the init() method to create servlet 
instance
 
Is This Answer Correct ?    2 Yes 0 No
Kishore
 
  Re: Which method the Servlet container call to create the instance of the servlet?
Answer
# 4
to create an instance of servlet servlet container calls 
newInstance() method
 
Is This Answer Correct ?    1 Yes 0 No
Naveen Kumar Bandi
 
  Re: Which method the Servlet container call to create the instance of the servlet?
Answer
# 5
servlet container calls the init() method to create the 
instance of the servlet.
The instance is created for the servlet in which the init() 
method is implemented.
 
Is This Answer Correct ?    0 Yes 0 No
Sunil
 
  Re: Which method the Servlet container call to create the instance of the servlet?
Answer
# 6
The ServletContainer is used default zero argument 
constructor to create servlet instance then after it calls 
init(ServletConfig cg) it internally calls init()for 
initialization puposes.


Plz guys init() is not used for creation of servlet instance
 
Is This Answer Correct ?    0 Yes 0 No
M.gangadhar From Sathya Techno
 
  Re: Which method the Servlet container call to create the instance of the servlet?
Answer
# 7
init() method is only used to initialize a servlet, and it
is called after the servlet instance has been created.
 
Is This Answer Correct ?    0 Yes 0 No
Pintu Debnath
 
  Re: Which method the Servlet container call to create the instance of the servlet?
Answer
# 8
The init() method is only used to initialize an existing 
servlet instance before it starts providing service to 
requests, it's never used for creating a servlet instance. 
I'm searching for the method which creates the servlet 
instace. But I can assure that we can't create a servlet 
instace, it's done by the container.
 
Is This Answer Correct ?    0 Yes 0 No
Samik Bandyopadhyay
 
  Re: Which method the Servlet container call to create the instance of the servlet?
Answer
# 9
After The successfull parsing of web.xml container will find
the particular class name which is mapped in web.xml and calls
class.forName(classname).newInstance() method.Then calls
init(ServletConfig config) of GenericServlet for
initializing the instance of the servlet.
 
Is This Answer Correct ?    1 Yes 0 No
Ravikiran(aptech Mumbai)
 

 
 
 
Other Servlets Interview Questions
 
  Question Asked @ Answers
 
Is it possible to send a mail from a servlet? Explain?  1
What advantages do servlets have over CGI programs?  3
Is the init(ServletConfig sc) throws IOException or not?  3
What is the difference between ExecuteUpdate and ExecuteQuery?  3
1.HttpSession 2.Hidden fields 3.URL Rewriting these primitive type of Session maintainance. What is the other type of process that could help to maintain the Session? pls Explain the process if u know? OnMobile3
What are the security issues in Servlets?  1
What is servlet? Siemens11
what is meant by Transaction Isolation Levels? IBM1
What is the capacity that doGet method can send to the server?  3
What methods do we use in Servlet to Applet communication?  1
difference between sendredirect,forward and url rewritting TCS3
what is the advantage of using Servlets over CGI programming?  2
HTTP tunneling means what?  1
hi.... i have problem in running of servlet. i am using Tomcat server in my pc.. The problem is when i am click on strat it will display like below FAIL - Application at context path /first could not be started.. How i can slove the problem.. help plz  1
How two servlets communicate with each other?  1
how the server will know its the same jsp page? HCL1
What is difference between Forward() and sendRedirect() methode?  8
How do you track a user session in servlets?  2
difference between forward and sendredirect Accenture2
What is the difference between an applet and a servlet?  8
 
For more Servlets Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com