Hi,
I'm just trying to execute example cutom tag program given in HF
Servlet &
JSP file page no: 494 to 498.
Header.tag
<%@ attribute name="fontColor" required="true" %>
<%@ tag body-content="tagdependent" %>
<img src="images/gopika-dec28.jpg"><br>
<em><strong><font color="${fontColor}"><jsp
oBody/></font></strong></em><br>
TestBean.jsp
<%@ taglib prefix="myTags" tagdir="/WEB-INF/tags" %>
<html><body>
<myTags:Header fontColor="#660099">
We take the
string out of
SOAP. OK, so it's not Jini,<br>
but we'll help you get through it with the least<br>
frustration and hair loss.
</myTags:Header>
</body></html>
But I'm getting the following error:
org.apache.jasper.JasperException: /TestBean.jsp(3,1) Unable to find setter method for attribute: fontColor
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:83)
org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:402)
org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:186)
org.apache.jasper.compiler.Generator$GenerateVisitor.evaluateAttribute(Generator.java:2643)
org.apache.jasper.compiler.Generator$GenerateVisitor.generateSetters(Generator.java:2791)
org.apache.jasper.compiler.Generator$GenerateVisitor.generateCustomDoTag(Generator.java:2335)
org.apache.jasper.compiler.Generator$GenerateVisitor.visit(Generator.java:1670)
org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1457)
org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2156)
org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2206)
org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2212)
org.apache.jasper.compiler.Node$Root.accept(Node.java:484)
org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2156)
org.apache.jasper.compiler.Generator.generate(Generator.java:3228)
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:284)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:451)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:437)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:555)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:291)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
what's wrong here. Even I tried Page 494 example with <%@ attribute name="subTitle" required="true" rtexprvalue="true"%> and got the same error. This was working without attributes. I doubt, do we need any tld file for this? This is not mentioned in the book.
regads
Sreenivas