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 define constructors in Servlet?

Answer Posted / qim2010

One can definitely have constructor in servlet. Even you can
use the constructor in servlet for initialization purpose,
but this type of approach is not so common. You can perform
common operations with the constructor as you normally do.
The only thing is that you cannot call that constructor
explicitly by the new keyword as we normally do. In the case
of servlet, servlet container is responsible for
instantiating the servlet, so the constructor is also called
by servlet container only.

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why are component architectures useful?

1069


Where can I find seam examples and documentation?

1099


What modifiers may be used with an interface declaration?

1137


how to use debug in my elipse to solve problems that exist in my project

2283


What are the difference between RMI and CORBA?

1116


the same information whether it will connect to the database or it will be used previous information?

1043


Is there a guarantee of uniqueness for entity beans?

1012


How would you create a button with rounded edges?

1153


whats is mean by tiles in struts

2230


Do we need to override service() method

1731


What is the highest-level event class of the event-delegation model?

1103


Java is fully object oriented languages or not?

1000


Where we can write Rmi registry in the code, without having to write it at the command prompt?

2771


How many times may an objects finalize() method be invoked by the garbage collector?

1091


what are RemoteObjects?

2744