| From | Sent On | Attachments |
|---|---|---|
| Luke Taylor | Aug 14, 2000 2:03 am | |
| java program | Aug 14, 2000 3:57 am | |
| Craig McClanahan | Aug 14, 2000 1:29 pm | |
| Joe Shevland | Aug 14, 2000 1:51 pm | |
| William Brogden | Aug 14, 2000 3:33 pm | |
| Craig McClanahan | Aug 14, 2000 3:39 pm | |
| William Brogden | Aug 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?
Craig McClanahan
--- 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>
I forgot to mention: this is the Tomcat 3.1 version of 4/18/2000 Using JDK 1.2.2 on an NT 4.0 sp3 system -- WBB - wbro...@bga.com Chief Scientist, LANWrights, Inc. Java Programmer Certification information and mock exam at http://www.lanw.com/java/javacert/





