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

           Summary: Reusing instance of FormTag class in Resin
           Product: Struts
           Version: Nightly Build
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Major
          Priority: Other
         Component: Custom Tags
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


We have encountered an error when using latest resin - 2.0.4 with Struts 1.0,
1.0.1 and CVS. We have two forms on a page, and we don't specify name parameter
explicitly in the html:form tag, e.g.:

...
<html:form action="actionFoo" method="GET">
...
</html:form>
...
<html:form action="actionBar" method="GET">
...
</html:form>

This works fine with Tomcat, which will create a new instance of FormTag for
every form. Resin will re-use the instance of FormTag. 

When reusing an instance of FormTag, Resin won't call release() before calling
another doStartTag() (seems like that's ok with the tag spec), so this means
that if both forms don't have parameter "name" set, for "actionFoo"
instantiation it will infer it from action mapping (which is fine), but for
"actionBar" it will just keep the name left from "actionFoo" (BUG!!!) -- see
code in FormTag.lookup(). 

A quick fix is to call release() in doEndTag(), which made it for me, but I am
not sure that's the right way it should be done.

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to