K
kaeli
Okay, I can't get what's wrong with my code. This is my first try at a
taglib beyond the helloWorld example at orionserver.com (which worked).
Note that I already checked everything that I could find via Google,
including case of names, name conflict with parent class, putting in
getters, and unique signatures.
The compiler throws the exception "Unable to find setter method for
attribute" at setClosed. The other setters work fine.
Here is a sample of the setters/getters. The String one works. The
boolean one does not. (Am I not allowed to use boolean or something?)
private String perms=null;
private boolean closed=false;
public void setPerms(String perms)
{
this.perms = perms;
}
public String getPerms()
{
return this.perms;
}
public void setClosed(boolean closed)
{
this.closed = closed;
}
public boolean getClosed()
{
return this.closed;
}
The JSP code:
<my_taglib:theTextbox
perms="write"
closed="false"
/>
Any ideas?
Full error:
[05/Jan/2004:10:10:32] info ( 8100): JSP: JSP1x compiler threw exception
org.apache.jasper.JasperException: Unable to find setter method for
attribute: closed
at java.lang.Throwable.fillInStackTrace(Native Method)
at java.lang.Throwable.fillInStackTrace(Compiled Code)
at java.lang.Throwable.<init>(Compiled Code)
at java.lang.Exception.<init>(Compiled Code)
at javax.servlet.ServletException.<init>
(ServletException.java:107)
at org.apache.jasper.JasperException.<init>
(JasperException.java:73)
at org.apache.jasper.compiler.TagBeginGenerator.generateSetters
(Compiled Code)
at
org.apache.jasper.compiler.TagBeginGenerator.generateServiceMethodStatem
ents(TagBeginGenerator.java:210)
at org.apache.jasper.compiler.TagBeginGenerator.generate
(TagBeginGenerator.java:279)
at org.apache.jasper.compiler.JspParseEventListener
$GeneratorWrapper.generate(Compiled Code)
at org.apache.jasper.compiler.JspParseEventListener.generateAll
(Compiled Code)
at
org.apache.jasper.compiler.JspParseEventListener.endPageProcessing
(JspParseEventListener.java:180)
at org.apache.jasper.compiler.Compiler.compile(Compiled Code)
at com.netscape.server.http.servlet.NSServletEntity.load
(NSServletEntity.java:230)
at com.netscape.server.http.servlet.NSServletEntity.update
(NSServletEntity.java:149)
at com.netscape.server.http.servlet.NSServletRunner.Service
(NSServletRunner.java:469)
--
taglib beyond the helloWorld example at orionserver.com (which worked).
Note that I already checked everything that I could find via Google,
including case of names, name conflict with parent class, putting in
getters, and unique signatures.
The compiler throws the exception "Unable to find setter method for
attribute" at setClosed. The other setters work fine.
Here is a sample of the setters/getters. The String one works. The
boolean one does not. (Am I not allowed to use boolean or something?)
private String perms=null;
private boolean closed=false;
public void setPerms(String perms)
{
this.perms = perms;
}
public String getPerms()
{
return this.perms;
}
public void setClosed(boolean closed)
{
this.closed = closed;
}
public boolean getClosed()
{
return this.closed;
}
The JSP code:
<my_taglib:theTextbox
perms="write"
closed="false"
/>
Any ideas?
Full error:
[05/Jan/2004:10:10:32] info ( 8100): JSP: JSP1x compiler threw exception
org.apache.jasper.JasperException: Unable to find setter method for
attribute: closed
at java.lang.Throwable.fillInStackTrace(Native Method)
at java.lang.Throwable.fillInStackTrace(Compiled Code)
at java.lang.Throwable.<init>(Compiled Code)
at java.lang.Exception.<init>(Compiled Code)
at javax.servlet.ServletException.<init>
(ServletException.java:107)
at org.apache.jasper.JasperException.<init>
(JasperException.java:73)
at org.apache.jasper.compiler.TagBeginGenerator.generateSetters
(Compiled Code)
at
org.apache.jasper.compiler.TagBeginGenerator.generateServiceMethodStatem
ents(TagBeginGenerator.java:210)
at org.apache.jasper.compiler.TagBeginGenerator.generate
(TagBeginGenerator.java:279)
at org.apache.jasper.compiler.JspParseEventListener
$GeneratorWrapper.generate(Compiled Code)
at org.apache.jasper.compiler.JspParseEventListener.generateAll
(Compiled Code)
at
org.apache.jasper.compiler.JspParseEventListener.endPageProcessing
(JspParseEventListener.java:180)
at org.apache.jasper.compiler.Compiler.compile(Compiled Code)
at com.netscape.server.http.servlet.NSServletEntity.load
(NSServletEntity.java:230)
at com.netscape.server.http.servlet.NSServletEntity.update
(NSServletEntity.java:149)
at com.netscape.server.http.servlet.NSServletRunner.Service
(NSServletRunner.java:469)
--