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=25488>.
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=25488

Nesting tags are incorrectly clearing parent nesting context.

           Summary: Nesting tags are incorrectly clearing parent nesting
                    context.
           Product: Struts
           Version: 1.1 Final
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Critical
          Priority: Other
         Component: Custom Tags
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


Let's consider following jsp snippet using 'nested' tags:

<nest:form action="/submit.do">

    <nest:nest property="prop1">
        <nest:define id="prop2" property="prop2"/>
    </nest:nest> <!-- bug: form bean context will be removed here -->

    <nest:nest property="prop1"> <!-- fail: Cannot find bean in any scope -->
        <nest:define id="prop2" property="prop2"/>
    </nest:nest>
</nest:form>

Above jsp code is by all means valid use of 'nested' tags.

Bug in doEndTag of NestedPropertyTag will incorrectly delete nesting context.
As of 1.1 version doEndTag looks like this:

  public int doEndTag() throws JspException {
    /* set the reference back */
    HttpServletRequest request = (HttpServletRequest)pageContext.getRequest();
    if (originalNest == null) {
      NestedPropertyHelper.deleteReference(request);
    } else {
--- 8< cut ----

but it should rather additionaly take into account value of 'originalName' field:

    if (originalNest == null && originalName == null) {
      NestedPropertyHelper.deleteReference(request);

Such change should be made in all doEndTag methods of 'nested' tags (probably
excluding 'root' tag).

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

Reply via email to