How to make servlet thread safe?
Answer Posted / surjit
We can make a servlet thread by implementing the SingleThreadModel interface.
i.e
Public class EmployeeTest extends HttpServlet implement SingleThreadModel{
Service(){
write yor code..........
}
}
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
What is the difference between the include() and forward() methods?
How do you run a servlet?
Explain the role of dispatcherservlet and contextloaderlistener.
What are the mechanisms used by a servlet container for maintaining session information?
What is the main purpose of java servlets?
What is java servlet session?
What are the life cycle methods of the servlet?
Can you send an authentication error from a servlet?
Can we use the constructor, instead of init(), to initialize servlet?
What is the procedure for initializing a servlet?
How can you use a servlet to generate a plain text instead of html?
What is getservletcontext?
What is servlet and how it works?
What is httpservlet and how it is different from genericservlet?
What do you mean by web applications?