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
What are the key methods that are involved in processing of http servlets?
Why is httpservlet declared abstract?
Which method is called when reference variable is passed in system.net?
how to link html file to sevlet file.one name is textbox,c&c++ is cheakbox,bc&mca is radio button and one submit buttonis ok why in this programme use in servelt file
How to get the current httpsession object?
Which exception is thrown if the servlet is not initialized properly?
hi actully i hav form columns with origin and destination names .as like as i need to create one more column with name amount. my requirement is when i select origin and destination columns automatically i need to get amount from database.how can i. please tel me with relative code
Explains the differences between context.getrequestdispatcher() and request.getrequestdispatcher()?
How to get the path of servlet in the server?
What is the use of attribute in servlets?
What is the importance of init() method in Servlet ?
Explain servlet.
Differentiate between get and post?
What is meant by a web application
How do you create a cookie using servlet?