> 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 did file such a bug for Tomcat 3.2.x..... ;-)

I was glad Tomcat 4 did fix this at some point as the only workaround was to
shorten the Tomcat's workdir path
(something like "d:\w"), which is an ugly fix anyway.

Keeping the structure of the webapps directories seems to me a good solution
for 2 reasons :

-- The surprise of too long filenames in Zindozs will disappear (your webapp
won't work with original JSP files either), so you move from a known bug to
a non-issue (the end-user aka JSP writer just has to make sure his filenames
are compatible with his OS - I guess he would even have a hard time saving
them...).

-- It will be far easier to look through java generated files when errors
happen on pages (at least, we can type a filename !) - mangling the
directory names with all those % and figures is a bit painful in Tomcat 3.2
when we have to debug our webapps...

Using a UID for each generated filename would be an idea too....and it's
easy to generate (using java.rmi.server.UID....I know it is a strange
location for such a class, but it works fine ! - although this is not the
best as the UID may not fit filenames patterns), but I prefer the directory
structure solution.

Hope my $0.02 helps...

Denis



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


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to