luehe 2004/08/10 17:50:29
Modified: jasper2/src/share/org/apache/jasper/compiler Tag: TOMCAT_5_0
Generator.java
Log:
Ported fixes for:
- Bugzilla 30291 ("Smap for a tag should not include its body")
- Bugzilla 30289 ("Incorrect Smap for multiple line java expression")
Revision Changes Path
No revision
No revision
1.234.2.1 +8 -5
jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/Generator.java
Index: Generator.java
===================================================================
RCS file:
/home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/Generator.java,v
retrieving revision 1.234
retrieving revision 1.234.2.1
diff -u -r1.234 -r1.234.2.1
--- Generator.java 11 Jun 2004 00:29:56 -0000 1.234
+++ Generator.java 11 Aug 2004 00:50:28 -0000 1.234.2.1
@@ -830,7 +830,9 @@
public void visit(Node.Expression n) throws JasperException {
n.setBeginJavaLine(out.getJavaLine());
- out.printil("out.print(" + n.getText() + ");");
+ out.printin("out.print(");
+ out.printMultiLn(n.getText());
+ out.println(");");
n.setEndJavaLine(out.getJavaLine());
}
@@ -2125,9 +2127,9 @@
Class tagHandlerClass = handlerInfo.getTagHandlerClass();
- n.setBeginJavaLine(out.getJavaLine());
out.printin("// ");
out.println(n.getQName());
+ n.setBeginJavaLine(out.getJavaLine());
// Declare AT_BEGIN scripting variables
declareScriptingVars(n, VariableInfo.AT_BEGIN);
@@ -2221,7 +2223,10 @@
out.pushIndent();
}
}
- };
+ // Map the Java lines that handles start of custom tags to the
+ // JSP line for this tag
+ n.setEndJavaLine(out.getJavaLine());
+ }
private void generateCustomEnd(
Node.CustomTag n,
@@ -2327,8 +2332,6 @@
syncScriptingVars(n, VariableInfo.AT_END);
restoreScriptingVars(n, VariableInfo.AT_BEGIN);
-
- n.setEndJavaLine(out.getJavaLine());
}
private void generateCustomDoTag(
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]