ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 24505] New: - jspc generated java files are not scanned correctly
Date Fri, 07 Nov 2003 17:10:57 GMT
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=24505>.
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=24505

jspc generated java files are not scanned correctly

           Summary: jspc generated java files are not scanned correctly
           Product: Ant
           Version: 1.5.4
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Optional Tasks
        AssignedTo: dev@ant.apache.org
        ReportedBy: florinduroiu@yahoo.com


This report is a combination of bug# 5826 (closed) and bug# 19762 (opened).
Tomcat version: 4.1.27
JDK: 1.3.1_06-b01

I have this structure:
File1.jsp
subFolder1/File2.jsp

I use jspc to precompile these jsp files. Jasper creates 2 java files like this:
File1_jsp.java
subFolder1/File2_jsp.java

In a subsequent step, I touch File2.jsp and re-run jspc. The task correctly 
identifies that File2.jsp has been modified and recompiles it into 
File2_jsp.java.
Because of bug# 19762, jspc task does not scan correctly the generated java 
files and reports that they not exist and therefore they will be generated 
again. There is a simple resolution for this bug and that is to append 
the .java to the resulted string of the method 
org.apache.tools.ant.taskdefs.optional.jsp.Jasper41Mangler::mapJspToJavaName
(File jspFile). After applying this fix, jspc correctly detects which java 
generated files are out-of-date.
The task then hands over to jasper the files needed to be compiled. Now, 
because of bug# 5826, jasper fails to detect which java generated files are out 
of date and does not compile them. Only by switching the jdk to 1.4.x this 
problem is fixed. 
Moreover, if a jsp file resides in a subfolder, (File2.jsp in my example) the 
jspc logic that scans for generated java files failes to find it (i.e. 
subFolder1/File2_jsp.java) because it looks only in the parent folder. The 
consequence is that all the jsp's located in subfolders are translated into 
java files each time the jspc task runs. Again, switching to JDK 1.4.x will 
solve this issue as well.
The only problem jdk 1.4 does not solve is that jspc passes all the jsp's for 
compilation if bug# 19762 is not fixed (although jasper is smart enough to scan 
for itself for already up to date java files).

Solution: a fix for bug#5826 and aplying a patch that correctly scans jsp 
subfolders also for jdk's other than 1.4 (I put this fix in attachment)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message