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 / narayana rao dasari

yes.....! we can write constructor for servlet class why
because every java class allows construction initialization
if we do not write constructor explicitly it will call
default constructior.

If we call our own constructiors means we will not able to
access the servelet config objects so better wat is to
intializeing in init() method......thank u,
Narayan

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are different Authentication options available in Servlets.

1061


What are the exceptions thrown by servlets? Why?

1163


What is Request Dispatcher?

1430


What are the benefits of using servlet over cgi?

1042


why we should override only no-agrs init() method.

1130


What is session?

1060


Is servlet thread safe?

982


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

955


What do you mean by servlet context?

1129


Explain how to improve Servlet Performance?

1136


Difference between GET and POST?

1149


What is a server side include (ssi)

1145


What if you need to span your transaction across multiple servlet invocations?

1082


What are the life-cycle methods for a servlet?

994


When a client request is sent to the servlet container, how does the container choose which servlet to invoke?

1021