• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

jsp is by default thead safe or not?

 
rudra malli
Greenhorn
Posts: 2
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
jsp is by default thead safe or not?
 
Abimaran Kugathasan
Ranch Hand
Posts: 2066
Clojure IntelliJ IDE Linux
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
rudra malli wrote:jsp is by default thead safe or not?

It's up to you! You can make it if you really want!
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64175
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please be sure to take the time to compose descriptive subjects for your posts. You will attract people who will can give you better and faster answers when your posts have good, descriptive subjects. For more information, please click this link ⇒ UseAMeaningfulSubjectLine.

Using a title of "jsp" in a forum completely dedicated to questions on JSP isn't going to attract the attention of those who can best help you.You can change your subject line by clicking the button on your post.
 
Ankit Tripathi
Ranch Hand
Posts: 199
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
By default JSP is not thread safe.
 
Lester Burnham
Rancher
Posts: 1337
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ankit Tripathi wrote:By default JSP is not thread safe.

I wouldn't phrase it like that. Many JSPs are thread-safe without the developer doing anything to make them so - simply because they do not use shared mutable state. However, I'd agree to a statement like "Any given arbitrary JSP can not be considered thread-safe until it is inspected and found to be so (or made so)."
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64175
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Indeed, if JSPs are written to modern standards (in other words, no scriptlets and no Java code within them), it's rather hard to make them non-thread-safe. Modifying properties willy-nilly on shared scoped variables in session and application context is about the only place you could get yourself into trouble.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic