Reputation:
Basically, we shouldn't use instance variables and methods in JSP declarations because it is not thread-safe. But GAE does not use threads. So should I use instance variables and methods in JSP declaration? I mean to ask whether it will cause any inaccurate data?
Upvotes: 0
Views: 448
Reputation: 262494
GAE does not use threads by default, but you can turn it on.
So, if you do not turn it on (by declaring your app thread-safe) you will not run into threading issues.
However, why would you want to use instance variables and methods in a JSP in the first place? A JSP should just produce page output and do nothing else. If it gets complex to the point where you want to throw in instance variables and methods, you probably want to move code out into a Java class (beans, servlets, filters).
Upvotes: 3