>On Thu, 3 Jan 2002, Paul DuBois wrote:
>
>> The documentation for <sql:update> indicates that the var attribute is
>> optional, but I find that without it I get an error message that the
>> TLD requires it. Adding var="dummy" cures the problem, but should
>> that be necessary?
>
>Hmm. The TLD doesn't show it to be required:
>
> <tag-class>org.apache.taglibs.standard.tag.el.sql.UpdateTag</tag-class>
> <body-content>JSP</body-content>
> <description>
> Executes the SQL update defined in its body or through the
> sql attribute.
> </description>
> <attribute>
> <name>var</name>
> <required>false</required>
> <rtexprvalue>false</rtexprvalue>
> </attribute>
>
>However, the tag handler did seem to assume it was set; I've fixed that,
>since I believe it was a bug. Are you sure the error message you got
>wasn't related to a NullPointerException that would have been thrown on an
>attempt to call pageContext.setAttribute(null, ...)?
No, I get:
org.apache.jasper.compiler.CompileException: /tables.jsp(19,0)
According to the TLD attribute var is mandatory for tag update
at
org.apache.jasper.compiler.TagBeginGenerator.validate(TagBeginGenerator.java:159)
at
org.apache.jasper.compiler.TagBeginGenerator.init(TagBeginGenerator.java:129)
etc.
I do get a NullPointerException if I leave out the dataSource attribute,
though. :-)
>
>Shawn
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>