tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kin...@apache.org
Subject cvs commit: jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler Generator.java
Date Fri, 19 Sep 2003 23:38:09 GMT
kinman      2003/09/19 16:38:09

  Modified:    jasper2/src/share/org/apache/jasper/compiler Generator.java
  Log:
  - Make sure scriptlet declarations get properly mapped.  This fixes 22833
  
  Revision  Changes    Path
  1.211     +7 -6      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.210
  retrieving revision 1.211
  diff -u -r1.210 -r1.211
  --- Generator.java	19 Sep 2003 18:30:09 -0000	1.210
  +++ Generator.java	19 Sep 2003 23:38:08 -0000	1.211
  @@ -196,9 +196,7 @@
                */
               public void visit(Node.PageDirective n) throws JasperException {
   
  -                if (!getServletInfoGenerated) {
  -                    getServletInfoGenerated = true;
  -                } else {
  +                if (getServletInfoGenerated) {
                       return;
                   }
   
  @@ -206,6 +204,7 @@
                   if (info == null)
                       return;
   
  +                getServletInfoGenerated = true;
                   out.printil("public String getServletInfo() {");
                   out.pushIndent();
                   out.printin("return ");
  @@ -217,8 +216,10 @@
               }
   
               public void visit(Node.Declaration n) throws JasperException {
  +                n.setBeginJavaLine(out.getJavaLine());
                   out.printMultiLn(new String(n.getText()));
                   out.println();
  +                n.setEndJavaLine(out.getJavaLine());
               }
   
               // Custom Tags may contain declarations from tag plugins.
  
  
  

Mime
View raw message