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

Why do we use sendredirect() method?

978


What do you mean by deployment descriptor?

1059


What do you mean by servlet?

1147


Can we override destroy method in servlet?

986


Why the container loads server at the application startup and how?

1064


Differentiate between the web server and application server?

1064


Which are the different ways you can communicate between servlets?

1001


How will you pass values from HTML page to the servlet?

1053


Can we fetch the attributes related to a servlet on a different servlet?

1148


Explain the architechure of a servlet?

1121


What are the servlet events?

1055


How to commuincate between an applet and a servlet?

1055


What is servlet configuration?

1069


When servlet object is created?

1161


How do I know if java is running on linux?

1125