Author: markt
Date: Mon Jan 12 13:29:40 2009
New Revision: 733905
URL: http://svn.apache.org/viewvc?rev=733905&view=rev
Log:
Revert r733072 after feedback from EG that original INVALID for
https://issues.apache.org/bugzilla/show_bug.cgi?id=46339 was correct.
Modified:
tomcat/trunk/java/org/apache/jasper/compiler/Generator.java
tomcat/trunk/java/org/apache/jasper/runtime/JspContextWrapper.java
Modified: tomcat/trunk/java/org/apache/jasper/compiler/Generator.java
URL:
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/compiler/Generator.java?rev=733905&r1=733904&r2=733905&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/jasper/compiler/Generator.java (original)
+++ tomcat/trunk/java/org/apache/jasper/compiler/Generator.java Mon Jan 12
13:29:40 2009
@@ -2032,6 +2032,9 @@
n.setBeginJavaLine(out.getJavaLine());
+ // Copy virtual page scope of tag file to page scope of invoking
+ // page
+ out.printil("((org.apache.jasper.runtime.JspContextWrapper)
this.jspContext).syncBeforeInvoke();");
String varReaderAttr = n.getTextAttribute("varReader");
String varAttr = n.getTextAttribute("var");
if (varReaderAttr != null || varAttr != null) {
@@ -2045,11 +2048,6 @@
out.print(toGetterMethod(n.getTextAttribute("fragment")));
out.println(" != null) {");
out.pushIndent();
- // Copy virtual page scope of tag file to page scope of invoking
- // page
- out.printil("((org.apache.jasper.runtime.JspContextWrapper)
this.jspContext).syncBeforeInvoke(");
- out.print(toGetterMethod(n.getTextAttribute("fragment")));
- out.println(".getJspContext());");
out.printin(toGetterMethod(n.getTextAttribute("fragment")));
out.println(".invoke(_jspx_sout);");
out.popIndent();
Modified: tomcat/trunk/java/org/apache/jasper/runtime/JspContextWrapper.java
URL:
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/runtime/JspContextWrapper.java?rev=733905&r1=733904&r2=733905&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/jasper/runtime/JspContextWrapper.java
(original)
+++ tomcat/trunk/java/org/apache/jasper/runtime/JspContextWrapper.java Mon Jan
12 13:29:40 2009
@@ -336,16 +336,6 @@
}
/**
- * Synchronize variables before fragment invokation
- * @param jspContext The JspContext the variable should sync to. This
- * is usually the context of the page where the fragment is.
- */
- public void syncBeforeInvoke(JspContext jspContext) {
- copyTagToPageScope(VariableInfo.NESTED, (PageContext)jspContext);
- copyTagToPageScope(VariableInfo.AT_BEGIN, (PageContext)jspContext);
- }
-
- /**
* Synchronize variables at end of tag file
*/
public void syncEndTagFile() {
@@ -362,17 +352,6 @@
* variable scope (one of NESTED, AT_BEGIN, or AT_END)
*/
private void copyTagToPageScope(int scope) {
- copyTagToPageScope(scope, invokingJspCtxt);
- }
-
- /**
- * Copies the variables of the given scope from the virtual page scope of
- * this JSP context wrapper to the page scope of the specified JSP context.
- *
- * @param scope variable scope (one of NESTED, AT_BEGIN, or AT_END)
- * @param jspContext the target context
- */
- private void copyTagToPageScope(int scope, PageContext jspContext) {
Iterator<String> iter = null;
switch (scope) {
@@ -398,9 +377,9 @@
Object obj = getAttribute(varName);
varName = findAlias(varName);
if (obj != null) {
- jspContext.setAttribute(varName, obj);
+ invokingJspCtxt.setAttribute(varName, obj);
} else {
- jspContext.removeAttribute(varName, PAGE_SCOPE);
+ invokingJspCtxt.removeAttribute(varName,
PAGE_SCOPE);
}
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]