tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marc van den Hoogen" <hoog...@wanadoo.nl>
Subject JSP 2.0 & Tag File with Scripting Variable: results in a JasperException
Date Mon, 15 Sep 2003 21:49:14 GMT

Hi,

With Tomcat 5.0.9 and 5.0.11 I get the following JasperException when using
a 'tag file' with a scripting variable:
"Unable to find setter method for attribute: theVar"

I searched the internet over and over for a solution.

(I simplified my original tag below for testing purposes).

Kind regards,

Marc van den Hoogen


JSP file (excerpt):
===================

<%@ taglib prefix="mh" tagdir="/WEB-INF/tags" %>
<%@ taglib prefix="c" uri="/jstl/core_rt" %>

<c:forEach var="meetmoment" items="${meetmomenten.rows}">
  <mh:getParameter theVar="aValue"/>  <%-- EXCEPTION HERE --%>
    ${aValue} <%-- REPORT VALUE OBTAINED FROM TAG --%>
</c:forEach>

Tag File (getParameter.tag):
============================
<%@ tag isELIgnored="false" %>
<%@ attribute name="theVar" required="true" rtexprvalue="false"
type="java.lang.String" %>
<%@ variable name-from-attribute="theVar" alias="theValue"
variable-class="java.lang.String" scope="AT_END" %>

<%@ taglib prefix="c" uri="/jstl/core_rt" %>
<c:set var="theValue" value="4.5" />

===============================================================
* Sun SDK J2SE 1.4.2_01.
* Tomcat 5.0.11, tried the same with 5.0.9 with similar result.


Mime
View raw message