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 servlet have instance variables?

Answer Posted / rajashree

The servlet you write can be used simulataneously by many
users at the same time and each user of the servlet has a
thread. Consider the user and the session one and the same.

Avoid instance variables. An instance variable is any
object owned by a a class. There will be only one of these
per class - not one per user. In general, you can not have
a user modify an instance variable because other users are
also using the same variable.

Is This Answer Correct ?    35 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How can we refresh automatically when new data is entered into the database?

1105


What's the architecture of a servlet package?

1058


What are the functions of an intercepting filter?

950


Which httpsession object is used to view and manipulate information about a session?

1184


What is servlet configuration?

1069


Can we override servlet service method?

1101


Name the different ways of session tracking.

1029


Which interface must be implemented by all servlets?

1346


Is servlet thread safe?

994


Which event is fired at the time of session creation and destroy?

1395


What is url encoding and url decoding

1154


Which java framework is most popular?

1144


What is the default http method in the servlet?

1303


How native code can be used in a servlet?

4069


What are Servlets?

1126