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

What are the exceptions thrown by servlets? Why?

1164


What are life cycle methods of a servlet?

1053


What is servlet container?

1112


What's the difference between servlets and applets?

1036


What do you mean by servlet context?

1129


What is the advantage of Servlets when compared with other server side technologies?

2341


What is the procedure of invoking different servlet in a different application?

1011


How can we include static files in the jsp page?

1057


How can we invoke another servlet in a different application?

1206


When using servlets to build the HTML, you build a DOCTYPE line, why do you do that?

1093


What are the types of protocols supported by httpservlet ?

1218


What are the life cycle methods of a servlet?

1043


What must be implemented by all servlets?

1095


Can you use javascript in servlets?

1077


Is servlet a framework?

1032