How to make servlet thread safe?
Answer Posted / sanjay
to make servlet as threas safe we have three approaches
1.do not instance variables into our servlet we use only
local variables
2.by using synchronized methods
3.synchronized blocks
above three ways synchronized blocks is the best way
| Is This Answer Correct ? | 12 Yes | 1 No |
Post New Answer View All Answers
Explain the servlet context.
What do you mean by request dispatcher in servlet? Also explain its methods.
How will two or three servlets interact or communicate with each other?
What is dispatcher servlet?
What are the uses of servlet
Write a program to show the functionality of doget and dopost method?
Explain is servlet mapping?
Why do we have servlet filters?
What do you mean by default initialization in java servlet?
What is meant by servlet? What are the parameters of the service method?
I Have A Plan to develop a Project in Struts,I want the template of struts project with Hibernate.Canany body provide me the required information?
How do we translate jsp?
How can we refresh automatically when new data is entered into the database?
How native code can be used in a servlet?
What do you mean by chaining in servlet?