Originally posted by Jack Lau:
Hello All,
I am very confuse that why if jsp page use isThreadSafe="false", the container will dispatch the request to the page one at a time in order but if jsp page use isThreadSafe="true", the generated servlet does not implement SingleThreadModel? It seems different from servlet...
Could anyone tell me why?
Thanks,
Jack
1)
Thread safe - allows multiple sumultaneous requests to one instance
a) servlets: is servlet thread safe ? yes - DO NOT implement SingleThreadModel
b) JSPs : is JSP thread safe ? yes.
isThreadSafe ? true.
DO NOT implement SingleThreadModel
2) NOT thread safe - allows only one request to one instance in one moment
a) servlets: is servlet thread safe ? no - implement SingleThreadModel
b) JSPs : is JSP thread safe ? no.
isThreadSafe ? false.
implement SingleThreadModel