Hello,
I have been writing my own custom jsp tags, and have recently
noticed that member properties of tags seem to be retained after the tag
is complete.
For example, lets say you have a tag that has an optional attribute
called "message", and the tag is designed to print this attribute if it
is passed. If you call this tag and pass "hello" as the attribute
message on one page, then call this tag on another page without passing
the attribute, it will still be set to "hello".
This functions much like a servlet, which is multi-threaded but
retains the values for member variables across different requests. I
think most servlet programmers realize this and stay away from using
non-static member variables. But it seems to me that custom JSP tag
design encourages the use of attributes, which seems to be potentially
very dangerous in an environment with a high volume of requests.
I would like to know if anyone knows of any good links where
concurrency issues in custom jsp tags are discussed more in depth.
Also, I am curious to know if anyone has encountered any problems like
this with the Struts tags. For example, if I set an "onmouseover" for a
<html:checkbox> tag, do I have to worry about this attribute showing up
in a <html:checkbox> tag called from a different page if both pages are
loaded by different users at the same time?
Thanks in advance for any info,
Bill