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 / sekhar babu

yes, we can write constructor on our own but it should be
no argument public constructor only, cause container will
create the object so it needs no argument constructor.

Is This Answer Correct ?    22 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain the lifecycle of a servlet?

1028


What are the uses of servlet and what is servlet chaining?

1147


What is the life-cycle of servlets?

1182


What do you mean by a filter and how does it work?

1009


Can we use the constructor, instead of init(), to initialize servlet?

1151


What is dispatcher servlet?

1111


How to create war file?

1230


What is the main purpose of java servlets?

1113


What are different ways for servlet authentication?

1168


Can you create a deadlock condition on a servlet?

1125


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

1153


What is http servlet?

1104


What is servletconfig?

1084


What is the disadvantage of cookies?

1035


What is a servlet engine?

1098