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 / sekhar babu

yes, we can write constructor on our own but it should be
no argument public constructor only, cause container will
create the object so it needs no argument constructor.

Is This Answer Correct ?    22 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain url encoding?

949


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 ?

1038


Why is init() method is used in servlets?

968


What do you mean by chaining in servlet?

998


What is a servlet-to-servlet communcation?

1120


What is the workflow of a servlet?

1132


What is the difference between the http servlet and generic servlet?

1098


How do cookies work in servlets?

1005


How to find whether a parameter exists in the request object?

1064


What is the directory structure of web application?

940


What do you mean by cgi and what are its drawbacks?

936


What are the functions of the servlet container?

1566


What is generic servlet class?

1016


Can we get PrintWriter and ServletOutputStream both in a servlet?

1108


What is the difference between the include() and forward() methods?

1037