tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Richa Oberoi" <>
Subject Unable to make my own tag with 3.1M1 !!!!!
Date Wed, 01 Mar 2000 11:16:29 GMT

i am trying to make my own tag quiet similar to the given taglib example 
so i started by making file very similar to 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 similar to
all these java files r in the same directory as for foo

now my.jsp looks something like this



<%@ taglib uri="" prefix="eg" %>


<eg:My MyAttr="Richa" NameAttr="Name" IsAttr="Is" RichaAttr="Richa">

<li><%= AttributeName %></li>





i have also made an entry of this tag in the TLD like this (again quiet similar to foo)

<!-- A simple Tag -->

<!-- My tag -->







Perform a server side action; uses 3 mandatory attributes



















now the problem is     the java files and 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(
	at org.apache.jasper.compiler.TagBeginGenerator.generate(
	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(
	at org.apache.jasper.compiler.Compiler.compile(Compiled Code)
	at org.apache.jasper.runtime.JspLoader.loadJSP(
	at org.apache.jasper.runtime.JspServlet$JspServletWrapper.loadIfNecessary(
	at org.apache.jasper.runtime.JspServlet$JspServletWrapper.service(
	at org.apache.jasper.runtime.JspServlet.serviceJspFile(
	at org.apache.jasper.runtime.JspServlet.service(Compiled Code)
	at javax.servlet.http.HttpServlet.service(
	at org.apache.tomcat.core.ServletWrapper.handleInvocation(Compiled Code)
	at org.apache.tomcat.core.ServletWrapper.handleRequest(
	at org.apache.tomcat.core.ContextManager.service(
	at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(

another thing i would like to mention is i tried modifying 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 !!!!!!

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message