jakarta-taglibs-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Toni Menninger" <toni.mennin...@silverleap.com>
Subject The use of release() in Taglibs
Date Wed, 26 Mar 2003 17:03:49 GMT
I noticed that all tags in the struts tag libraries use the release() method
to reset data members, for example

   public void release() {

        super.release();
        name = Constants.BEAN_KEY;
        property = null;
        text = null;
        value = null;

    }

But I understood that release() is only called before the tag object is
destroyed, thus it doesn't make much sense to reset data members in this
method. This should rather be done in doEndTag() method (e.g. James
Goodwill: Mastering JSP Custom Tags and Tag Libraries). This is only an
issue if the JSP engine pools the tag objects.

If I am wrong about this, please correct me!

Toni

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message