You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by lu...@apache.org on 2002/11/01 02:13:51 UTC
cvs commit: jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/runtime JspContextWrapper.java
luehe 2002/10/31 17:13:48
Modified: jasper2/src/share/org/apache/jasper/runtime
JspContextWrapper.java
Log:
- Fixed removeAttribute(String name).
- If variable doesn't exist in the tag scope, remove it from the
calling page scope during synchronization.
Revision Changes Path
1.7 +11 -5 jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/runtime/JspContextWrapper.java
Index: JspContextWrapper.java
===================================================================
RCS file: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/runtime/JspContextWrapper.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- JspContextWrapper.java 28 Oct 2002 18:16:21 -0000 1.6
+++ JspContextWrapper.java 1 Nov 2002 01:13:47 -0000 1.7
@@ -180,8 +180,12 @@
}
public void removeAttribute(String name) {
- removeAttribute(name, PAGE_SCOPE);
- invokingJspCtxt.removeAttribute(name);
+ pageAttributes.remove(name);
+ invokingJspCtxt.removeAttribute(name, REQUEST_SCOPE);
+ if (getSession() != null) {
+ invokingJspCtxt.removeAttribute(name, SESSION_SCOPE);
+ }
+ invokingJspCtxt.removeAttribute(name, APPLICATION_SCOPE);
}
public void removeAttribute(String name, int scope) {
@@ -364,6 +368,8 @@
Object obj = getAttribute(varName);
if (obj != null) {
invokingJspCtxt.setAttribute(varName, obj);
+ } else {
+ invokingJspCtxt.removeAttribute(varName, PAGE_SCOPE);
}
}
}
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>