ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steve Loughran" <stev...@iseran.com>
Subject jasperc question
Date Sat, 18 Jan 2003 07:23:03 GMT
Now that I'm looking at fixing the name mangling, I'm confused.

There are two jasperc compilers in the source tree
    jakarta-tomcat-jasper
and another under jakarta-tomcat-4.0, which is probably what the current
jspnamemangler came from.

>From the branch tree it is jakarta-tomcat-jasper that is active. The latter
does its name mangling thusly:

    public String getServletClassName() {
        if (servletClassName != null) {
            return servletClassName;
        }
        int iSep = jspUri.lastIndexOf('/') + 1;
        int iEnd = jspUri.length();
        StringBuffer modifiedClassName =
            new StringBuffer(jspUri.length() - iSep);
 if (!Character.isJavaIdentifierStart(jspUri.charAt(iSep))) {
     // If the first char is not a legal Java letter or digit,
     // prepend a '_'.
     modifiedClassName.append('_');
 }
        for (int i = iSep; i < iEnd; i++) {
            char ch = jspUri.charAt(i);
            if (Character.isJavaIdentifierPart(ch)) {
                modifiedClassName.append(ch);
            } else if (ch == '.') {
                modifiedClassName.append('_');
            } else {
                modifiedClassName.append(mangleChar(ch));
            }
        }
        servletClassName = modifiedClassName.toString();
        return servletClassName;
    }

So the rules are pretty simple, except I dont see the addtion of the _jsp at
the end. Where does that come from? Does anyone know their way round jasper
*and* what any likely changes are due.

-Steve


--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message