Read the java beans spec: getMyAttr and setMyAttr when made to a property the first character is dropped in case (unless the second character is uppercase) so the attr is myAttr not MyAttr. Richa Oberoi wrote: > > hi!!! > > i am trying to make my own tag quiet similar to the given taglib example > so i started by making MyTag.java file very similar to FooTag.java extending same ExampletagBase and implementing BodyTag > now this tag has 4 attributes or scripting variables whose values i provide in my.jsp (similar to foo.jsp) > also made MyTagExtraInfo.java similar to FooTagExtraInfo.java > all these java files r in the same directory as for foo > > now my.jsp looks something like this > > > > > > <%@ taglib uri="http://java.apache.org/tomcat/examples-taglib" prefix="eg" %> > > > > > > > > i have also made an entry of this tag in the TLD like this (again quiet similar to foo) > > > > > > > > My > > examples.MyTag > > examples.MyTagExtraInfo > > JSP > > > > Perform a server side action; uses 3 mandatory attributes > > > > > > MyAttr > > true > > > > > > NameAttr > > true > > > > > > IsAttr > > true > > > > > > RichaAttr > > true > > > > > > now the problem is the java files MyTag.java and MyTagExtraInfo.java compile fine but when i compile the My.jsp in explorer it gives the following error > > Error: 500 > Internal Servlet Error: > > org.apache.jasper.JasperException: Unable to find setter method for attribute: MyAttr > at org.apache.jasper.compiler.TagBeginGenerator.generateSetters(Compiled Code) > at org.apache.jasper.compiler.TagBeginGenerator.generateServiceMethodStatements(TagBeginGenerator.java:206) > at org.apache.jasper.compiler.TagBeginGenerator.generate(TagBeginGenerator.java:275) > 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:159) > at org.apache.jasper.compiler.Compiler.compile(Compiled Code) > at org.apache.jasper.runtime.JspLoader.loadJSP(JspLoader.java:226) > at org.apache.jasper.runtime.JspServlet$JspServletWrapper.loadIfNecessary(JspServlet.java:137) > at org.apache.jasper.runtime.JspServlet$JspServletWrapper.service(JspServlet.java:148) > at org.apache.jasper.runtime.JspServlet.serviceJspFile(JspServlet.java:255) > at org.apache.jasper.runtime.JspServlet.service(Compiled Code) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:865) > at org.apache.tomcat.core.ServletWrapper.handleInvocation(Compiled Code) > at org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:224) > at org.apache.tomcat.core.ContextManager.service(ContextManager.java:347) > at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:144) > at org.apache.tomcat.service.TcpConnectionThread.run(TcpEndpoint.java:305) > at java.lang.Thread.run(Thread.java:466) > > another thing i would like to mention is i tried modifying FooTag.java first by removing 1 attribute and then by adding another(that is making them 4) > and correspondingly making changes in the jsp and the TLD it works fine !!!!! > > i am working on Windows NT and using VCafe 3.0 JVM > > so Please help !!!!!!