Bug 6320 - Scripting elements confuses the Core TLV
Summary: Scripting elements confuses the Core TLV
Alias: None
Product: Taglibs
Classification: Unclassified
Component: Standard Taglib (show other bugs)
Version: unspecified
Hardware: All All
: P3 blocker (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
Depends on:
Reported: 2002-02-08 00:30 UTC by Hans Bergsten
Modified: 2004-11-16 19:05 UTC (History)
0 users


Note You need to log in before you can comment on or make changes to this bug.
Description Hans Bergsten 2002-02-08 00:30:08 UTC
A scripting element in an element seem to mess up the TLV state and cause invalid
error message due to this. An example:

    <c:when test="1 == 1">
      <%= foo %>
      <c:set var="isValid" value="false" />

This gives "Illegal child tag in "c:choose": "c:set". If I remove the scripting
element it works fine.
Comment 1 Shawn Bayern 2002-02-08 00:36:42 UTC
Thanks again for the report, Hans, but are you certain that you weren't 
validating a stale page or another part of the page than the fragment you 
listed?  I can't replicate the problem or see any reason for it glancing at the 
TLV code.  The following page, in toto, works for me in Tomcat 4.0.1:

 <%@ taglib prefix="c" uri="http://java.sun.com/jstl/ea/core" %>
 <% String foo = "bar"; %>
   <c:when test="1 == 1">
     <%= foo %>
     <c:set var="isValid" value="false" />

Are you sure the error matches the code fragment?
Comment 2 Hans Bergsten 2002-02-08 00:50:16 UTC
Sorry, my bad. I had forgot that I had hacked versions of the TLVs in my web 
app ;-) My incorrect hack to fix the <jsp:useBean> problem caused the problem
I reported here. I'll update to your latest version as soon as the nightly
builds are done.