tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From William Brogden <wbrog...@bga.com>
Subject Re: Taglib Runtime attribute setting not working
Date Mon, 14 Aug 2000 22:53:20 GMT


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 - wbrogden@bga.com  Chief Scientist, LANWrights, Inc.
Java Programmer Certification information and mock exam
at  http://www.lanw.com/java/javacert/

Mime
View raw message