This SMAPs all declaration nodes, including the ones tacked on to the root node by 
ELFunctionMapper.java.  So for instance the SMAP for jsp2/el/functions.jsp from the 
jsp-examples webapp ends with

43,6:120
1,3:10
1,5:13

thus SMAPping 

  <%@ taglib prefix="my" uri="http://jakarta.apache.org/tomcat/jsp2-example-taglib"%>

to

  static private org.apache.jasper.runtime.ProtectedFunctionMapper _jspx_fnmap_0;
  static private org.apache.jasper.runtime.ProtectedFunctionMapper _jspx_fnmap_1;

and

  static {
    _jspx_fnmap_0= 
org.apache.jasper.runtime.ProtectedFunctionMapper.getMapForFunction("my:reverse", 
jsp2.examples.el.Functions.class, "reverse", new Class[] {java.lang.String.class});
    _jspx_fnmap_1= 
org.apache.jasper.runtime.ProtectedFunctionMapper.getMapForFunction("my:countVowels", 
jsp2.examples.el.Functions.class, "numVowels", new Class[] {java.lang.String.class});
  }

which is clearly wrong.

Eric

----- Original Message ----- 
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, September 19, 2003 4:38 PM
Subject: cvs commit: 
jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler Generator.java


> 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.
>   
>   
>   
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

Reply via email to