ALLInterview.com :: Home Page
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   Errors
   Testimonials Refer this Site  Refer This Site to Your Friends  Site Map  Contact Us      
   
 
Categories >> Software >> Java Related >> Java J2EE >> Servlets
 


 

 
Question Hi guys.. Well can u tell me that why there is need of
"init()" , i mean why can not we initialize the servlet object
with the help of constructors?
Thank you.
 Question Asked In Companies ::     < I also faced this Question! >
 Question Submitted By :: tanzeem.akhtar
  Answer Posted By  
 
Answer
When u create a servlet with a constructor it wont be a
complete servlet but will be in a akward state where it
cannot access Servlet Context and Config.It has to go
through the init() method (though we dont know what code is
written there) to be a complete servlet

Is This Answer Correct ?    1 Yes 0 No


 
  archana
 
View All Answers
 
 
Please Help Members By Posting Answers For Below Questions
 
 Question Views   Select
 
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 >> 1160
What methodology can be followed to store more number of objects in a remote server? 652
What is Client-Server Computing? 694
How to get ip address in jsp login page and how to validate like 127.1.0.1 all should not be greater than 255 1563
Hi frnd can i any one kindly can post for me portlet,hibernate and spring example application and with flow explantion configuration using Jdeveloper.and related links ar tutorials kindly please send me .its urgent for me .thanks in advance...........else can any one send to kondaiah.goddeti@gmail.com 628
what is multiple server? 624
how the HTML data stored in web server? 658
how to link html file to sevlet file.one name is textbox,c&c++ is cheakbox,bc&mca is radio button and one submit buttonis ok why in this programme use in servelt file 768
I Have A Plan to develop a Project in Struts,I want the template of struts project with Hibernate.Canany body provide me the required information? 1064
Hello, My project requirement is like I need to create a web page using MVC pattern. I hava a bean class, jsp page, servlet, service and dao. My jsp has two fields. One is dropdown list. The option values has to get populated from the database table. The other one is a text box and its value has to come from database table. As of now I have defined the fields in bean class, got the values from database using arraylists in dao class and I called this from service class. Can anyone please tell me the workflow of how the servlet will get this arraylist and populate the arraylist values as dropdown options in jsp page? Also I would like to know the role of bean class in MVC pattern? Thanks in advance! 503
hi actully i hav form columns with origin and destination names .as like as i need to create one more column with name amount. my requirement is when i select origin and destination columns automatically i need to get amount from database.how can i. please tel me with relative code 870
How native code can be used in a servlet? 2143
What is the advantage of Servlets when compared with other server side technologies? 703
Which method is called when reference variable is passed in system.net? 641
E-Mail New Answers        Answer Selected Questions