How to make servlet thread safe?
Answer Posted / monkyspiderpig
The only thing you need to do is to define only static
variables at Class level. When a method is called each
thread gets a new variable.
| Is This Answer Correct ? | 8 Yes | 41 No |
Post New Answer View All Answers
What is servlet instance?
Why doesn’t a servlet include main()?
explain the advantages of servlet life cycle?
What is servlet lazy loading?
Can we refresh servlet in client and server side automatically?
When using servlets to build the HTML, you build a DOCTYPE line, why do you do that?
What do you mean by mime type?
Explain the difference between servlet and cgi?
How do you communicate in between Applets and Servlets?
Are Servlets Thread Safe? How to achieve thread safety in servlets?
Explain servlet events?
Why doesn’t a servlet include main()? How does it work?
What is context in servlet?
How do I support both get and post from the same servlet?
Why do we use sendredirect() method?