Bug 19422 - Changing beanId from "" to null makes input tags non-reusable.
Summary: Changing beanId from "" to null makes input tags non-reusable.
Alias: None
Product: Taglibs
Classification: Unclassified
Component: Input Taglib (show other bugs)
Version: 1.1
Hardware: All All
: P3 normal (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
Depends on:
Reported: 2003-04-29 10:50 UTC by Ari Savolainen
Modified: 2004-11-16 19:05 UTC (History)
0 users


Note You need to log in before you can comment on or make changes to this bug.
Description Ari Savolainen 2003-04-29 10:50:06 UTC
In the following jsp-fragment the bean is used in the latter <input:text> in
spite of attribute bean="" in some JSP containers. This is because the beanId
field of the input tags is changed to null if it was originally "". (There is a
workaround: give an arbitrary value to the bean attribute. The workaround causes
some unnecessary method calls.)

    Map map = new HashMap();
    map.put("foo", "bar");
    pageContext.setAttribute("map", map);
        <input:form bean="map" method="post" >
            <input:text name="foo" bean="" /><br />
            <input:text name="foo" bean="" />

A fragment from the JSP specification 1.2 (from chapter Tag Extension API -
JSP.10.1 - Simple Tag Handlers - Properties):

Once properly set, all properties are expected to be persistent, so that if the
JSP container ascertains that a property has already been set on a given tag
handler instance, it needs not set it again.
Comment 1 Karl von Randow 2004-10-26 22:26:44 UTC
Fixed with the change to a local variable for beanId changes and addition of 
release() methods.
Comment 2 Karl von Randow 2004-10-26 22:27:42 UTC
Fixed with change to using use a local beanId variable and addition of release
() method.