DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=5726>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=5726 Reusing instance of FormTag class in Resin [EMAIL PROTECTED] changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED Resolution|INVALID | ------- Additional Comments From [EMAIL PROTECTED] 2002-01-07 15:28 ------- I disagree. I understand that Resin's way of handling tags is ok, but the way Struts deals with the situation is definitely wrong. What you suggest is merely a workaround. Currently Struts' TLD does allow forms with "action" parameter alone. It works with tomcat, possibly other engines, and I am fine with that - I'd rather specify the form bean once in struts-config.xml, than in every page containing a form. If you think we must use name (and therefore type) property, then make it mandatory in the TLD. Otherwise the case is not resolved and other people will stumble on it eventually. I believe I have seen one person complainig on resin list about this and no one understood what he was talking about - http://www.caucho.com/support/resin-interest/0110/0300.html So as I can see it - there are two solutions: 1. Explicitly FORCE people to use "name" and "type" in form tags by changing TLD. 2. Fix FormTag so it works properly by cleaning its state with "action" alone. I am not going to push it further, but I believe it is a bug. ------- Additional Comments From [EMAIL PROTECTED] 2002-01-07 20:55 ------- Alex is correct, this is a Struts bug. The JSP 1.2 spec, page 163, Lifecycle, note 3, states: "Note that since there are no guarantees on the state of the properties, a tag handler that had some optional properties set can only be reused if those properties are set to a new (known) value. This means that tag handlers can only be reused within the same "AttSet" (set of attributes that have been set)." Alex's example uses two form tags with the same AttSet, so it is legal for Resin to reuse the tag handler. Later in the spec, on page 166, regarding release(), it states: "there may be multiple invocations on doStartTag and doEndTag in between [calls to release]". This is exactly what Resin is doing. The bug is that the form tag is internally assigning a value to the "name" attribute, thus changing the state of the tag handler between invocations within the same AttSet. I suspect that this is not the only case of this bug in the Struts taglibs. -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>