Tuesday, November 29, 2011

What is the difference between declaring the variables in the scriptlet tags and in the declaration tags?

Declaring the variables in the scriptlet is gone into the service method when jsp converted into servlet but in declaration tags goes into the class label variable:A variable that is declared by using a JSP declaration element end up as an Instance variable in the genarated servlet.All threads share the instance variable, so if one thread changes its value, it will be seen by other threads also.
Category:JSP Interview Questions

No comments:

Post a Comment