How can we create a thread safe JSP ? A <%@ page isThreadSafe = "true" %> B <%@ page implements="SingleThreadModel" %> C <%@ page isThreadSafe="false" %> D <%@ page extends="SingleThreadModel" %>
To my opinion Answer A is correct ,means application is thread safe and doesnot implement SingleThreadModel.
Mock Exam Explaination Answer C
The isThreadSafe attribute of page directive defines whether the generated servlet needs to implement SingleThreadModel. The default value for isThreadSage attribute is true and if false, the generated servlet will implement SingleThreadModel.
Although the explaination is right but answer is wrong. Please share your views
I think this question is pertaining to old exam. Now the singleThread model is deprecated, as it give false impression that the severlet is thread safe. By making isThreadSafe attribute to false, it means that you are asking the container to make my servlet thread safe.