ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 4750] - jspc flattens directory structure when translating jsp->java
Date Thu, 14 Mar 2002 10:15:48 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=4750>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=4750

jspc flattens directory structure when translating jsp->java





------- Additional Comments From mpichler@hyperwave.com  2002-03-14 10:15 -------
This seems to be a jasper feature(bug?) and not an ant problem because
we observed the same on calling <java classname="org.apache.jasper.JspC">
with ant 1.4.

We found the behavior caused by getBaseClassName of
org.apache.jasper.compiler.CommandLineCompiler
Suggested fix:

[...]
	if (className == null) {
            // String jspname = jsp.getName();  // original (last name part)
            String jspname = ctxt.getJspFile();  // context relative path
            if (jspname.endsWith(".jsp"))
                className = jspname.substring(0, jspname.length() - 4);
            else
                className = jspname;
        }
[...]
        StringBuffer modifiedClassName = new StringBuffer();
        for (int i = 0; i < className.length(); i++) {
            char chi = className.charAt(i);
            if (chi == File.separatorChar)  // convert '/' resp. '\' to "__"
                modifiedClassName.append("__");
            else if (Character.isLetterOrDigit(chi))
                modifiedClassName.append(chi);
            else  // _ in class names get mangled to _0005f
                modifiedClassName.append(mangleChar(className.charAt(i)));
        }
[...]

--
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