Say you have a class with an instance scope like belong.
Once you set the variable you set it not for just the current user but all users of the web site. How can I can I make an instance variable accessible to only the current session?
Below "a" is only null the first time any user hits the customer tag, all users after that will have the value filled:
public class X extends BodyTagSupport {
private String a;
public int doStartTag() {
if (a == null)
a = "x";
}
public int doEndTag() {
if (x.equals("SSSS"))
doSomething();
return EVAL_BODY;
}
}
Once you set the variable you set it not for just the current user but all users of the web site. How can I can I make an instance variable accessible to only the current session?
Below "a" is only null the first time any user hits the customer tag, all users after that will have the value filled:
public class X extends BodyTagSupport {
private String a;
public int doStartTag() {
if (a == null)
a = "x";
}
public int doEndTag() {
if (x.equals("SSSS"))
doSomething();
return EVAL_BODY;
}
}