Believe or not, Jasper once mangled the file names in a way similar to what is in the patch. It was modified in response to a bug (Bugzilla is currently unavailable, so I can't look up the bug number). The filer complained that for a file with deeply nested path, the resultant file name is too long to work in Window, since there is a 250(?) character file name limit there.
I think a better fix is not to mangle the path into the file name, but to put the .java (and .class) files in a directory structure that mirrors the .jsp structure. This is how it work currently, for the non -webapps case. > Date: Tue, 18 Dec 2001 15:47:25 -0500 > From: Steve Downey <[EMAIL PROTECTED]> > Subject: [PATCH] Bug 5471 - JspC broken when compiling webapps > To: "[EMAIL PROTECTED] (E-mail)" <[EMAIL PROTECTED]> > MIME-version: 1.0 > Delivered-to: mailing list [EMAIL PROTECTED] > Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm > X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N > List-Post: <mailto:[EMAIL PROTECTED]> > List-Subscribe: <mailto:[EMAIL PROTECTED]> > List-Unsubscribe: <mailto:[EMAIL PROTECTED]> > List-Help: <mailto:[EMAIL PROTECTED]> > List-Id: "Tomcat Developers List" <tomcat-dev.jakarta.apache.org> > > This patch changes CommandLineContext.getServletPackageName() to return a > package name based on the path to the JSP as well as the package name > supplied on the command line. > > Without a change like this, a webapp that has files with the same name, such > as index.jsp, in more than one place is compiled incorrectly, with both JSP > files being mapped to the same servlet. > > With this patch, the java files are placed in the correct directories, and > generation of web.xml works. > > > <><><><><><><><><><><><><><><><><><><><><>This electronic mail transmission > may contain confidential information and is intended only for the person(s) > named. Any use, copying or disclosure by any other person is strictly > prohibited. If you have received this transmission in error, please notify > the sender via e-mail. <><><><><><><><><><><><><><><><><><><><><> > > -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>