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...

Hi guys.. Well can u tell me that why there is need of
"init()" , i mean why can not we initialize the servlet object
with the help of constructors?
Thank you.

Answer Posted / gaurav agrawal

If we initialize the servlet via constructor then we cant
access the ServletConfig object at the time of
initialization.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the GenericServlet class?

1293


If servlet receives multiple requests, how many objects will it create?

1441


What is the main purpose of java servlets?

1115


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

1118


Is servlet synchronized?

1137


What is the life cycle of a servlet?

1615


What are the different types of servlets?

1066


Can we refresh servlet in client and server side automatically?

1110


What is the capacity the doget can send to the server?

1131


Tell us something about servletconfig interface.

1053


What is java servlet session?

1027


What is the difference between using getSession(true) and getSession(false) methods?

1106


What are the types of an http request?

1218


What are the phases of the servlet life cycle?

1186


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 ?

1144