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?

Answers were Sorted based on User's Feedback



can servlet have instance variables?..

Answer / 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

can servlet have instance variables?..

Answer / unknown

Dear Soori and Shekhar ot post ur name here u answer YES if
u not know the right logic then why u post ur answers nways
thanks to Rajashree for the right answer

Is This Answer Correct ?    11 Yes 4 No

can servlet have instance variables?..

Answer / neeraj

Ravikiran.chd

If we implement single thread model then how servlet will
handle multiple request at a time??

So its better to avoid the use of instance variable.

Is This Answer Correct ?    3 Yes 0 No

can servlet have instance variables?..

Answer / debapriya maity

Yeah we surely can provide instance variable,but ur servlet
implements MultithreadModel,its is not the right
approach,better use local varibles ,using SingleThreadModel
approach cause perfomance degradation

Is This Answer Correct ?    3 Yes 1 No

can servlet have instance variables?..

Answer / ramana

it is not recomended to use instance variables in servlet...if necessary use static variables..

Is This Answer Correct ?    2 Yes 0 No

can servlet have instance variables?..

Answer / ravikiran.chd

yes and we can make them thread safe by implementing
SingleThreadModel

Is This Answer Correct ?    2 Yes 2 No

can servlet have instance variables?..

Answer / shekhar

yes

Is This Answer Correct ?    3 Yes 8 No

can servlet have instance variables?..

Answer / soori

yes

Is This Answer Correct ?    5 Yes 12 No

Post New Answer

More Servlets Interview Questions

Which are the different ways you can communicate between servlets?

0 Answers  


waht is the main diference b/w servelts and JSP ?

8 Answers   CAP, HCL,


What is the need of session tracking in web application?

0 Answers  


Can we get PrintWriter and ServletOutputStream both in a servlet?

0 Answers  


What is meant by session? Tell me something about httpsession class?

0 Answers  


Is that servlet is pure java object or not?

0 Answers  


What is the difference between CGI and Servlet?

0 Answers  


Why servlet is mostly used?

0 Answers  


How many Cookies can a host support?

2 Answers  


What is servlet and its life cycle?

0 Answers  


Explain Servlet Chaining ?

2 Answers  


Explain the differences between jsp and servlet.

0 Answers  


Categories