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

I Have A Plan to develop a Project in Struts,I want the template of struts project with Hibernate.Canany body provide me the required information?

2695


How can you create a session in servlet?

1147


what do you understand by url rewriting?

963


What are all the protocols supported by httpservlet?

1287


What are the types of an http request?

1159


What are different Authentication options available in Servlets.

1075


What is servlet in tomcat?

1062


What are important features of Servlet 3?

1094


What is the difference between genericservlet and httpservlet

1099


How to get the server information in a servlet?

1173


Can we override servlet service method?

1102


List out difference between a JavaBean from a Servlet?

1038


How does Cookies work in Servlets?

1183


What is servlet initializer?

983


List the Different types of servlet?

1046