wood burning stoves 2.0*
The moose likes JSP and the fly likes jsp is by default thead safe or not? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "jsp is by default thead safe or not?" Watch "jsp is by default thead safe or not?" New topic
Author

jsp is by default thead safe or not?

rudra malli
Greenhorn

Joined: Oct 10, 2010
Posts: 2
jsp is by default thead safe or not?
Abimaran Kugathasan
Ranch Hand

Joined: Nov 04, 2009
Posts: 2066

rudra malli wrote:jsp is by default thead safe or not?

It's up to you! You can make it if you really want!


|BSc in Electronic Eng| |SCJP 6.0 91%| |SCWCD 5 92%|
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60780
    
  65

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.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Ankit Tripathi
Ranch Hand

Joined: Oct 17, 2009
Posts: 198
By default JSP is not thread safe.
Lester Burnham
Rancher

Joined: Oct 14, 2008
Posts: 1337
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

Joined: Jan 10, 2002
Posts: 60780
    
  65

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.
 
wood burning stoves
 
subject: jsp is by default thead safe or not?
 
Similar Threads
Multiple times submitting a form leads to errors in submission.
servlets
Urgent : Thread Safe
Threads in servlet
Servlets