Prepare for your Next Interview
|
Welcome to the Geeks Talk forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact contact us. |
This is a discussion on Constructor and Servlet Config within the Java forums, part of the Software Development category; 1. Can a constructor replace the Servlet Config function in the init method of a servlet. 2. If the function of the init method in the servlet is to initate ...
|
|||||||
|
|||
|
Constructor and Servlet Config
1. Can a constructor replace the Servlet Config function in the init method of a servlet.
2. If the function of the init method in the servlet is to initate a servlet while it is get loaded by means of servlet config parameter cant we achieve the same thing just by using a constructor . The main function of the constructors are to load the objects with some initial values while it is created. The function of the servlet's init method is also used to load the servlet with some initial values by using servlet config object as a parameter. If both the functionalities are doing the same task of initializing an object while it is get created, can we replace the servlet config parameter by parameterized constructor? If any body knows the answer Please send it to me. Thanks a lot. |
| Sponsored Links |
![]() |
|
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Can we have 2 Struts Config.xml file | Geek_Guest | JSP | 10 | 11-10-2008 09:25 AM |
| Servlet context and Servlet config | narenderreddy | Java | 4 | 06-26-2008 08:54 AM |
| Web.config and class | raghulvarma | ASP.NET | 3 | 01-18-2008 04:46 AM |
| why i am getting an error while calling a constructor from another constructor | raj_java_j2ee | Java | 4 | 07-22-2007 03:39 AM |
| Machine config in ASP.NET | JobHelper | ASP.NET | 2 | 12-22-2006 06:12 PM |