Bug 22034 - Page scope not properly set with <c:if>
Summary: Page scope not properly set with <c:if>
Status: RESOLVED FIXED
Alias: None
Product: Taglibs
Classification: Unclassified
Component: Standard Taglib (show other bugs)
Version: 1.1
Hardware: All All
: P3 normal (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-07-31 22:28 UTC by Pierre Delisle
Modified: 2004-11-16 19:05 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Pierre Delisle 2003-07-31 22:28:09 UTC
The <c:if> action does not set page scope properly.
Access the JSP page below, and the problem will show
under a container that supports pooling when the page 
is reloaded .

--- test.jsp ---
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

Setting 'var1' in page scope<br>
<c:if test="${true}" var="var1" scope="page"/>
pageScope.var1: ${pageScope.var1}<br>
applicationScope.var1: ${applicationScope.var1}<br>

Setting 'var2' in application scope<br>
<c:if test="${true}" var="var2" scope="application"/>
applicationScope.var2: ${applicationScope.var2}<br>

--- end test.jsp ---

OUTPUT:
--- First Time ---
Setting 'var1' in page scope
pageScope.var1: true
applicationScope.var1:
Setting 'var2' in application scope
applicationScope.var2: true

--- After First Time ---
Setting 'var1' in page scope
pageScope.var1:
applicationScope.var1: true
Setting 'var2' in application scope
applicationScope.var2: true
Comment 1 Pierre Delisle 2003-08-01 06:00:19 UTC
<c:if> was not handling properly 'page' scope. Fixed.