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

What is the difference between Server and Container?

1180


Define context initialization parameters.

984


How to create war file?

1094


What is the purpose of dispatcherservlet properties?

1017


Which application server is best for java?

1021


How the servlet is loaded?

1009


How can you create a session in servlet?

1086


What are the objects involved when a servlet receives a call from client?

964


What is the difference between servlet and filter?

914


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

1028


Explain the role of dispatcherservlet and contextloaderlistener.

1122


What do you mean by scope object and what are its types?

1022


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

1114


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

1047


What exception should be thrown when servlet is not properly initialized?

963