• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

isThreadSafe

 
Ranch Hand
Posts: 168
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Bartender
Posts: 3955
43
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
 
reply
    Bookmark Topic Watch Topic
  • New Topic