tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cos...@apache.org
Subject cvs commit: jakarta-tomcat/src/share/org/apache/jasper/compiler ForwardGenerator.java IncludeGenerator.java
Date Sun, 26 Aug 2001 01:49:02 GMT
costin      01/08/25 18:49:02

  Modified:    src/share/org/apache/jasper/compiler ForwardGenerator.java
                        IncludeGenerator.java
  Log:
  Bug 1705 - error if the param value is a non-trivial expression.
  
  Revision  Changes    Path
  1.4       +7 -6      jakarta-tomcat/src/share/org/apache/jasper/compiler/ForwardGenerator.java
  
  Index: ForwardGenerator.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/jasper/compiler/ForwardGenerator.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ForwardGenerator.java	2000/06/11 21:41:06	1.3
  +++ ForwardGenerator.java	2001/08/26 01:49:02	1.4
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-tomcat/src/share/org/apache/jasper/compiler/ForwardGenerator.java,v
1.3 2000/06/11 21:41:06 mandar Exp $
  - * $Revision: 1.3 $
  - * $Date: 2000/06/11 21:41:06 $
  + * $Header: /home/cvs/jakarta-tomcat/src/share/org/apache/jasper/compiler/ForwardGenerator.java,v
1.4 2001/08/26 01:49:02 costin Exp $
  + * $Revision: 1.4 $
  + * $Date: 2001/08/26 01:49:02 $
    *
    * ====================================================================
    * 
  @@ -111,10 +111,11 @@
   		    sep = "?";
   		    initial = false;
   		} else sep = "&";
  -		
  +
  +		// Bug 1705 - need "("
   		if (value.length == 1 && JspUtil.isExpression(value[0]))
   		    writer.println("_jspx_qfStr = _jspx_qfStr + \"" + sep +
  -				   key + "=\" + " + JspUtil.getExpr(value[0]) + ";");
  +				   key + "=\" + (" + JspUtil.getExpr(value[0]) + ");");
   		else {
   		    if (value.length == 1)
   			writer.println("_jspx_qfStr = _jspx_qfStr + \"" + sep +
  @@ -126,7 +127,7 @@
   					       key + "=\" + \"" + value[i] + "\";");
   			    else
   				writer.println("_jspx_qfStr = _jspx_qfStr + \"" + sep +
  -					       key + "=\" +" + JspUtil.getExpr(value[i])+ ";");
  +					       key + "=\" + (" + JspUtil.getExpr(value[i])+ ");");
   			    if (sep.equals("?")) sep = "&";			    
   			}
   		    }
  
  
  
  1.8       +2 -2      jakarta-tomcat/src/share/org/apache/jasper/compiler/IncludeGenerator.java
  
  Index: IncludeGenerator.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/jasper/compiler/IncludeGenerator.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- IncludeGenerator.java	2001/03/10 05:13:40	1.7
  +++ IncludeGenerator.java	2001/08/26 01:49:02	1.8
  @@ -128,7 +128,7 @@
   		
   		if (value.length == 1 && JspUtil.isExpression(value[0])) {
   		    writer.println("_jspx_qStr = _jspx_qStr + \"" + sep +
  -				   key + "=\" + " + JspUtil.getExpr(value[0]) + ";");
  +				   key + "=\" + (" + JspUtil.getExpr(value[0]) + ");");
   		} else {
   		    if (value.length == 1) {
   			writer.println("_jspx_qStr = _jspx_qStr + \"" + sep +
  @@ -140,7 +140,7 @@
   					       key + "=\" + \"" + value[i] + "\";");
   			    else
   				writer.println("_jspx_qStr = _jspx_qStr + \"" + sep +
  -					       key + "=\" +" + JspUtil.getExpr(value[i])+ ";");
  +					       key + "=\" + (" + JspUtil.getExpr(value[i])+ " );");
   			    if (sep.equals("?")) sep = "&";
   			    
   			}
  
  
  

Mime
View raw message