atom feed7 messages in org.apache.tomcat.usersRe: Taglib Runtime attribute setting ...
FromSent OnAttachments
Luke TaylorAug 14, 2000 2:03 am 
java programAug 14, 2000 3:57 am 
Craig McClanahanAug 14, 2000 1:29 pm 
Joe ShevlandAug 14, 2000 1:51 pm 
William BrogdenAug 14, 2000 3:33 pm 
Craig McClanahanAug 14, 2000 3:39 pm 
William BrogdenAug 14, 2000 3:52 pm 
Subject:Re: Taglib Runtime attribute setting not working
From:William Brogden (wbro@bga.com)
Date:Aug 14, 2000 3:52:58 pm
List:org.apache.tomcat.users

Craig McClanahan wrote:

William Brogden wrote:

I got the following usage of a custom taglib to work under the orion server but Tomcat reports an error -- <%@ taglib uri="JSPbook/taglib" prefix="ch11" %>

<ch11:signin studentId="<%= request.getParameter("stuid") %>" studentPw="<%= request.getParameter("stupw") %>" course="<%= request.getParameter("course") %>" >

<h2>Student Login for <%= request.getParameter("stuid") %></h2> <h3>Course Status</h3> (.... course status information would go here... ) </ch11:signin> ------ abbreviated error: org.apache.jasper.compiler.ParseException: C:\Chap11\signin.jsp(6,55) Attribute stuid has no value at org.apache.jasper.compiler.JspReader.parseAttributeValue(JspReader.java:456) at org.apache.jasper.compiler.JspReader.parseTagAttributes(JspReader.java:572) at org.apache.jasper.compiler.Parser$Tag.accept(Parser.java:795) at org.apache.jasper.compiler.Parser.parse(Parser.java:1073) at org.apache.jasper.compiler.Parser.parse(Parser.java:1038) at org.apache.jasper.compiler.Parser.parse(Parser.java:1034)

One possible cause for difficulties would be if you did not declare, in your TLD, that the "signin" tag accepts runtime expressions for the three parameters. Have you got <rtexprvalue>true</rtexprvalue> in the definitions of studentId, studentPw, and course?

--- here is what the tld section looks like:

<tag> <!-- tag illustrating runtime attributes --> <name>signin</name> <tagclass>com.JSPbook.Chap11.SignInTag</tagclass> <info>A tag to check student id and password</info> <attribute><name>course</name><required>true</required> <rtexprvalue>true</rtexprvalue> </attribute> <attribute><name>studentId</name><required>true</required> <rtexprvalue>true</rtexprvalue> </attribute> <attribute><name>studentPw</name><required>true</required> <rtexprvalue>true</rtexprvalue> </attribute> </tag>