Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

Can we write a constructor for a Servlet class ? if yes how ?
if no why not ?

Answer Posted / narayana rao dasari

yes.....! we can write constructor for servlet class why
because every java class allows construction initialization
if we do not write constructor explicitly it will call
default constructior.

If we call our own constructiors means we will not able to
access the servelet config objects so better wat is to
intializeing in init() method......thank u,
Narayan

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

why we should override only no-agrs init() method.

1132


Why doesn’t a servlet include main()? How does it work?

1160


How to get the current httpsession object?

1121


Is servlet a framework?

1039


What do you mean by request dispatcher in servlet? Also explain its methods.

1151


What are the different session tracking techniques?

1196


What is a web container and what is its responsibility?

981


What is the difference between Servlet Request and Servlet Context when calling a Request Dispatcher?

1252


What is the main purpose of java servlets?

1061


Write a program to show the functionality of servlets.

1012


Explain the concept of ssi ?

1071


How can you push data from an Applet to a Servlet?

1098


How can we refresh automatically when new data has entered the database?

1114


Is servlet thread safe?

992


Which method of the httpservletrequest object is used?

1093