Is JSP variable declaration thread safe?
by, 01-01-2012 at 06:20 PM (3031 Views)
No, in JSP the variable declaration is not at all thread safe as the declared variables are ended up as instance variable in generated servlet not in body of _jspservice() method.
The given declaration is not considered to be thread safe: as they are declarations and are evaluated only one time when page gets loaded.
The given declaration is considered thread safe: as in the scriplets the variables that have been declared are not shared and have local scope.