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 / ravikiran

we cann't write a constructor because the servlet container
will create the instance of the servlet by calling the
no-arg constructor

Is This Answer Correct ?    1 Yes 8 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the life-cycle methods for a servlet?

942


In the servlets, we are having a web page that is invoking servlets ,username and password? which is checks in database? Suppose the second page also if we want to verify

959


How do servlets work?

976


What is a web application and what is it’s directory structure?

1027


Explain how does JSP handle run-time exceptions?

1038


Differentiate between get and post?

1102


explain the advantages of servlet life cycle?

931


Is servlet a controller?

961


Can servlet have a constructor ?

999


Are Servlets Thread Safe? How to achieve thread safety in servlets?

921


What is the use of java servlet api?

976


What are the functions of an intercepting filter?

885


What is cgi and what are its drawbacks?

981


What are the steps involved in placing a servlet within a package?

1030


A client sends requests to two different web components. Both of the components access the session. Will they end up using the same session object or different session ?

1027