tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From James House <james.ho...@partnet.com>
Subject Re: Including same file multiple times
Date Mon, 15 May 2000 14:58:02 GMT

This has been a "known" bug for quite some time, and it is fixed, however
not in the "release" build.

I have "extracted" the fix from the nightly build, and have a very small
.jar file that you can use to patch the bug.

If you're interested, send me an e-mail, and I'll directly mail you the
.jar file.

James


At 02:16 PM 5/13/00 -0500, you wrote:

>I have a complex JSP application that does compile time includes of the
>same file in multiple places.
>This seems like a perfectly reasonable thing to do, especially if you need
>to include a reusable
>fragment.  Unfortunately, the Tomcat 3.1 JSP compiler doesn't allow this
>behavior.  Instead, it
>spits out an error message:
>
>org.apache.jasper.compiler.ParseException: Seen file /WizardErrors.jsp
>already, maybe this is a recursive include?!
>
>This message should probably be reduced to a warning.  Is there a log file
>for these messages?
>
>Anyway, I patched the registerSourceFile method in JspReader.java to send
>the message to
>standard error instead.  Is this a reasonable fix?
>
>     protected int registerSourceFile(String file) {
>         if (sourceFiles.contains(file)) {
>
>             // ZFR: 5/13/2000, Changed include file behavior to issue a
>warning
>             // when a file is included multiple times instead of dumping
>out with
>             // an error.
>
>             String errMsg = Constants.getString
>("jsp.error.file.already.registered",new Object[] { file });
>             System.err.println(errMsg);
>
>             return sourceFiles.indexOf(file);
>             //return -1;
>         }
>         sourceFiles.addElement(file);
>         this.size++;
>         return sourceFiles.size()-1;
>     }
>
>
>
>--------------------------------------------------------------------------
>To unsubscribe, email: tomcat-user-unsubscribe@jakarta.apache.org
>For additional commmands, email: tomcat-user-help@jakarta.apache.org


Mime
View raw message