tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 7356] New: - Jasper cannot find setter for Custom JSP Tag attribute 'returns' in Tomcat 4.0.3
Date Fri, 22 Mar 2002 05:56:03 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=7356>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=7356

Jasper cannot find setter for Custom JSP Tag attribute 'returns' in Tomcat 4.0.3

           Summary: Jasper cannot find setter for Custom JSP Tag attribute
                    'returns' in Tomcat 4.0.3
           Product: Tomcat 4
           Version: 4.0.3 Final
          Platform: PC
               URL: http://131.94.143.135:8080/cop4540/editall.jsp
        OS/Version: Linux
            Status: NEW
          Severity: Major
          Priority: Other
         Component: Jasper
        AssignedTo: tomcat-dev@jakarta.apache.org
        ReportedBy: mgonza30@fiu.edu


For some reason, when trying to use Custom JSP Tag libraries with Tomcat 4.0.3 
Jasper throws a CompileException complaining that the setter for the attribute 
named 'returns' cannot be found. 

The error does not occur in Tomcat 4.0, it used to compile and work properly on 
that version. 

The JSP page calls the tag as follows: 

<PC:SQLForEach returns="true" sql="SELECT Name FROM CHARACTERISTICS" 
connection="charconnection">
   //content
</PC:SQLForEach>

The section of the TLD that defines the tag is:

<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE taglib
  PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN"
  "http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_2.dtd">
<taglib>
       <!-- some stuff -->
	<tag>
		<name>SQLForEach</name>
		<tag-class>jsptags.SQLForEach</tag-class>		
		<body-content>JSP</body-content>	
		<description>
                       some description here
		</description>
		<attribute>
			<name>returns</name>
			<required>false</required>
			<rtexprvalue>true</rtexprvalue>			
		</attribute>
		<attribute>
			<name>sql</name>
			<required>true</required>
			<rtexprvalue>true</rtexprvalue>				
		</attribute>
		<attribute>
			<name>connection</name>
			<required>true</required>
			<rtexprvalue>true</rtexprvalue>
		</attribute>			
		<attribute>
			<name>maxCount</name>
			<required>false</required>
			<rtexprvalue>true</rtexprvalue>
		</attribute>	
		<attribute>
			<name>minCount</name>
			<required>false</required>
			<rtexprvalue>true</rtexprvalue>
		</attribute>		
	</tag>
<!-- some stuff -->
</taglib>

The tag in question, SQLForEach, contains the methods:

public void setReturns(boolean b)
{
 //code
}

public boolean getReturns()
{
  //code 
}

The error has been replicated in Tomcat 4.0.3 on Linux Mandrake 7.0 (Intel 
Pentium II, 64MB RAM), Win98 (Intel Pentium2 233, 64MB RAM) and Win2K (AMD 
Duron 600, 128MB RAM). 

Included is the url of a JSP page that uses the tag. 

The stack trace is: 
org.apache.jasper.compiler.CompileException: /editall.jsp(34,0) Unable to find 
setter method for attribute: returns
	at org.apache.jasper.compiler.TagBeginGenerator.generateSetters
(TagBeginGenerator.java:214)
	at 
org.apache.jasper.compiler.TagBeginGenerator.generateServiceMethodStatements
(TagBeginGenerator.java:332)
	at org.apache.jasper.compiler.TagBeginGenerator.generate
(TagBeginGenerator.java:394)
	at 
org.apache.jasper.compiler.JspParseEventListener$GeneratorWrapper.generate
(JspParseEventListener.java:834)
	at org.apache.jasper.compiler.JspParseEventListener.generateAll
(JspParseEventListener.java:241)
	at org.apache.jasper.compiler.JspParseEventListener.endPageProcessing
(JspParseEventListener.java:197)
	at org.apache.jasper.compiler.Compiler.compile(Compiler.java:215)
	at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:552)
	at 
org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary
(JspServlet.java:177)
	at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service
(JspServlet.java:189)
	at org.apache.jasper.servlet.JspServlet.serviceJspFile
(JspServlet.java:382)
	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:474)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter
(ApplicationFilterChain.java:247)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter
(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.StandardWrapperValve.invoke
(StandardWrapperValve.java:243)
	at org.apache.catalina.core.StandardPipeline.invokeNext
(StandardPipeline.java:566)
	at org.apache.catalina.core.StandardPipeline.invoke
(StandardPipeline.java:472)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
	at org.apache.catalina.core.StandardContextValve.invoke
(StandardContextValve.java:190)
	at org.apache.catalina.core.StandardPipeline.invokeNext
(StandardPipeline.java:566)
	at org.apache.catalina.valves.CertificatesValve.invoke
(CertificatesValve.java:246)
	at org.apache.catalina.core.StandardPipeline.invokeNext
(StandardPipeline.java:564)
	at org.apache.catalina.core.StandardPipeline.invoke
(StandardPipeline.java:472)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
	at org.apache.catalina.core.StandardContext.invoke
(StandardContext.java:2343)
	at org.apache.catalina.core.StandardHostValve.invoke
(StandardHostValve.java:180)
	at org.apache.catalina.core.StandardPipeline.invokeNext
(StandardPipeline.java:566)
	at org.apache.catalina.valves.ErrorDispatcherValve.invoke
(ErrorDispatcherValve.java:170)
	at org.apache.catalina.core.StandardPipeline.invokeNext
(StandardPipeline.java:564)
	at org.apache.catalina.valves.ErrorReportValve.invoke
(ErrorReportValve.java:170)
	at org.apache.catalina.core.StandardPipeline.invokeNext
(StandardPipeline.java:564)
	at org.apache.catalina.valves.AccessLogValve.invoke
(AccessLogValve.java:468)
	at org.apache.catalina.core.StandardPipeline.invokeNext
(StandardPipeline.java:564)
	at org.apache.catalina.core.StandardPipeline.invoke
(StandardPipeline.java:472)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
	at org.apache.catalina.core.StandardEngineValve.invoke
(StandardEngineValve.java:174)
	at org.apache.catalina.core.StandardPipeline.invokeNext
(StandardPipeline.java:566)
	at org.apache.catalina.core.StandardPipeline.invoke
(StandardPipeline.java:472)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
	at org.apache.catalina.connector.http.HttpProcessor.process
(HttpProcessor.java:1012)
	at org.apache.catalina.connector.http.HttpProcessor.run
(HttpProcessor.java:1107)
	at java.lang.Thread.run(Thread.java:536)

--
To unsubscribe, e-mail:   <mailto:tomcat-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-dev-help@jakarta.apache.org>


Mime
View raw message