Download SCWCD pdf document and check isThreadSafe attribute.
If isThreadSafe attribute is true , then multiple requests are handled by threads of single servlet instance.Each
thread handles a request.
the default value of this attribute is true which means application is threadsafe.
So, doesn't this imply that all servlets are threadsafe?
These two lines are misinterpreted here.First line asserts jsp's are thread-safe.
second line depends on your coding in jsp page. If you use scriptlet, declarative type of code in jsp's then threading issues may arise.
Check the below example for your reference.
I am not sure whether declaration of count will work fine or not..
According to me count is having class level scope.This means every thread will have count value to 0 first time..
If count value is declared in init(), then the above code works fine..
Thanks & Regards,
Vipul Kumar.