Geeks Talk

Prepare for your Next Interview




Constructor and Servlet Config

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 ...


Go Back   Geeks Talk > Software Development > Java

Register FAQ Members List Calendar Mark Forums Read
  #1 (permalink)  
Old 02-26-2008
Junior Member
 
Join Date: Apr 2007
Location: chennai
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
kannappanr is on a distinguished road
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.
Reply With Quote
Sponsored Links
Reply

  Geeks Talk > Software Development > Java


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 3 Weeks Ago 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


All times are GMT -4. The time now is 05:50 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Copyright © 2008 GeekInterview.com. All Rights Reserved