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

Reply via email to