alex typed the following on 17:17 13/12/2000 +0900
>hi all!!
>i got a problem with my code.
>and the most of all.
>i cannot find where i made mistake.
>i was stuck for several days.
>who can help me?
I have a similar problem.
>Root cause:
>java.lang.NullPointerException
> at
>org.apache.jasper.compiler.TagBeginGenerator.generateSetters(TagBeginGenerat
>or.java:196)
> at
>org.apache.jasper.compiler.TagBeginGenerator.generateServiceMethodStatements
>(TagBeginGenerator.java:291)
> at
>org.apache.jasper.compiler.TagBeginGenerator.generate(TagBeginGenerator.java
>:360)
I've found it only happens when I use certain attributes in a custom tag. I'd be
interesting in seeing the relevant parts of your configuration and code.
Here's my taglib definition:
<tag>
<name>FormField</name>
<tagclass>com.bitbull.webutil.forms.FormFieldTag</tagclass>
<bodycontent>empty</bodycontent>
<attribute>
<name>name</name>
<required>true</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>required</name>
<rtexprvalue>true</rtexprvalue>
</attribute>
</tag>
And in my JSP page:
<%@ taglib uri="/WEB-INF/jsp/webutil-forms.tld" prefix="FORM"%>
This doesn't have any problems:
<FORM:FormField name="language"/>
This does:
<FORM:FormField name="username" required="true"/>
My tag class has the setter method:
public void setRequired (String required)
{
this.required = "true".equals(required);
}
I can't see any problems with this - any insight would be more than welcome!
Until then it's into the source.
Kief
---
bitBull makes the Internet bite: http://www.bitBull.com/demos/