Bug 63076 - Jasper (from Ant) throws FileNotFoundException exceptions when building JSPs in subdirectories.
Summary: Jasper (from Ant) throws FileNotFoundException exceptions when building JSPs ...
Status: RESOLVED DUPLICATE of bug 63056
Alias: None
Product: Tomcat 9
Classification: Unclassified
Component: Jasper (show other bugs)
Version: 9.0.14
Hardware: PC Linux
: P2 regression (vote)
Target Milestone: -----
Assignee: Tomcat Developers Mailing List
Depends on:
Reported: 2019-01-11 16:32 UTC by Zach Callear
Modified: 2019-01-11 16:51 UTC (History)
1 user (show)


Note You need to log in before you can comment on or make changes to this bug.
Description Zach Callear 2019-01-11 16:32:46 UTC

* The following "build.xml" is used, simplified from that documented at https://tomcat.apache.org/tomcat-9.0-doc/api/org/apache/jasper/JspC.html :

<project name="Webapp Precompilation" default="all" basedir=".">
    <import file="/usr/share/tomcat9/bin/catalina-tasks.xml"/>
    <target name="jspc">
    <target name="all" depends="jspc"></target>
* Some JSP files are inside subdirectories within the "uriroot" ("jsps" in example) directory.

* Ant is ran as "ant" (no arguments) from the same directory as the "build.xml" file and the "jsps" directory.

Then, for each JSP file inside a subdirectory, Ant logs a FileNotFoundException, where the subdirectory of the JSP file is duplicated in the exception message.  For example, if a JSP file is located at "jsps/foo/Bar.jsp", Ant logs "[jasper] SEVERE: org.apache.jasper.JasperException: java.io.FileNotFoundException: File [/foo/foo/Bar.jsp] not found".  With the same example JSP file, empty directories are created at "output/_jsp/foo" and "output/_jsp/foo/foo".

JSP files not in subdirectories of the "uriroot" work as expected (end up directly inside "output/_jsp").

This works properly in Tomcat 9.0.13.
Comment 1 Mark Thomas 2019-01-11 16:51:28 UTC

*** This bug has been marked as a duplicate of bug 63056 ***