Plaese see this simple jsp tags and tell me which one is safe in place of memory usage and in multiple threads code 1 <%! String value; %> <% value=request.getParameter("id"); %> code 2 <% String value=request.getParameter(id); %> [This message has been edited by Anoop Krishnan (edited May 22, 2001).]
I just want to know is there any body call my bean's Getter and Setter methods with "Please" in front - My favorite quip from Bugzilla
posted 14 years ago
Hello anoop well in code 1, if you open multiple browser windows, then in that case value will hold the latest value .. for example suppose you declare value as <%! int value=0 ; %> and in your code suppose you do <% value=value+1;%> then when you open one browser value you will get the value of the variable "value" as 1.
Again if you open another window and re run your code and get the value of the variable "value" then it will not hold one it will hold two. So in this case the value is persistent Where as in code 2 the variable "value" will remain local for each particular session. i hope this clears your doubt .. in case i am wrong correct me or in case you didnt get it ... send a reply bye