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 / abhishek taneja

yes offcourse you can write a constructor for a servlet
after all it is a java class. you can simply provide but if
u do not provide then it is by default include the no
argument constructor that is used by the Init() method in
the servlet life cycle.

Is This Answer Correct ?    11 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to create war file?

1093


Is servlet a server side scripting language?

1064


Why do we need a constructor in a servlet if we use the init method?

986


What do you mean by mime type?

923


What is the servletconfig object?

969


What are the ways to handle multi-threading in servlets?

1021


What does the term localization refer to?

1034


What is httpservlet and how it is different from genericservlet?

1037


Why do we need servlet filter?

1004


Why do we use sendredirect() method?

927


What is meant by a servlet?

1043


What are the life cycle methods of the servlet?

1035


What do you mean by web applications? Explain web application directory arrangement?

914


Which http method is said to be non-idempotent and idempotent?

1000


Which java framework is most popular?

1067