From: SourceForge.net <no...@so...> - 2003-05-24 09:12:37
|
Bugs item #742633, was opened at 2003-05-24 09:12 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=376685&aid=742633&group_id=22866 Category: JBossTest Group: v3.2 Status: Open Resolution: None Priority: 5 Submitted By: roberto (rroberto) Assigned to: Nobody/Anonymous (nobody) Summary: JBOSS 3.2.1 / Jetty and Tag Support Initial Comment: The servlet engine doesn't call the release method on tags every time is used from jsp pages. This because a pool is used . this is the servlet code generated from a jsp .... private org.apache.jasper.runtime.TagHandlerPool _jspx_tagPool_ABSTag_CustomButton_xmlDocument_s cope; .... /* ---- ABSTag:CustomButton ---- */ com.dat.abs.web.tags.ABSCustomButtonTag _jspx_th_ABSTag_CustomButton_0 = (com.dat.abs.web.tags.ABSCustomButtonTag) _jspx_tagPool_ABSTag_CustomButton_xmlDocument_s cope.get (com.dat.abs.web.tags.ABSCustomButtonTag.class); _jspx_th_ABSTag_CustomButton_0.setPageContext (pageContext); _jspx_th_ABSTag_CustomButton_0.setParent (_jspx_th_ABSTag_ButtonBody_0); _jspx_th_ABSTag_CustomButton_0.setXmlDocument (vXmlDocument); _jspx_th_ABSTag_CustomButton_0.setScope(vScope); int _jspx_eval_ABSTag_CustomButton_0 = _jspx_th_ABSTag_CustomButton_0.doStartTag(); if (_jspx_th_ABSTag_CustomButton_0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) return; _jspx_tagPool_ABSTag_CustomButton_xmlDocument_s cope.reuse(_jspx_th_ABSTag_CustomButton_0) .... the method "reuse" on TagHandlerPool is.. /** * Adds the given tag handler to this tag handler pool, unless this tag * handler pool has already reached its capacity, in which case the tag * handler's release() method is called. * * @param handler Tag handler to add to this tag handler pool */ public synchronized void reuse(Tag handler) { if (current < (handlers.length - 1)) handlers[++current] = handler; else handler.release(); } so only when handler pool has already reached its capacity the tag's release() method is called. From the sun javadoc about interface javax.servlet.jsp.tagext.Tag: "Called on a Tag handler to release state. The page compiler guarantees that JSP page implementation objects will invoke this method on all tag handlers". This cause that the global internal variable of the tag are not "clear". It's a jetty bug ? or i can't use internal variable (or i must reset it) There is no problem this optional tag attributes, because a pool is created for each combination of tag/arguments passed. ty Roberto ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=376685&aid=742633&group_id=22866 |