Geeks Talk

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.

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 Blogs FAQ Tag Cloud Calendar Mark Forums Read

Java Java related Issues and Problems

Reply

 

LinkBack Thread Tools Display Modes
  #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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


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


All times are GMT -4. The time now is 09:36 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.3.1
Copyright © 2009 GeekInterview.com. All Rights Reserved