Bug 41227

Summary: When the jasper compiler fails to compile a JSP, it doesn't print the name of the file
Product: Tomcat 5 Reporter: Aaron Digulla <digulla>
Component: JasperAssignee: Tomcat Developers Mailing List <dev>
Status: RESOLVED WORKSFORME    
Severity: enhancement    
Priority: P3    
Version: 5.5.17   
Target Milestone: ---   
Hardware: All   
OS: All   
URL: /smol_explorer/login/html/index_html.jsp

Description Aaron Digulla 2006-12-21 09:03:56 UTC
When you precompile a large set of JSPs and the compile fails for a file, jspc
doesn't print the name of the file, so you have no idea which JSP is broken. All
you get is the name of the last *successfully* compiled JSP if you make it
verbose (so the error is in the *next* file which isn't listed).

Either print the name of each JSP as you compile it or print the name when you
encounter an error.
Comment 1 Yoav Shapira 2007-03-25 15:47:46 UTC
This is a good idea, and it's something that bugged me for a while as well. I've
gone ahead and added DEBUG-level logging statements to JspC so that you know
which file it's processing.  You need to enable DEBUG-level logging for this
class to see the output: see
http://tomcat.apache.org/tomcat-5.5-doc/logging.html for directions.
Comment 2 Aaron Digulla 2007-03-30 02:44:35 UTC
In case of an error, the compiler should always print the filename.

I know the code is a bit of a mess in that respect but still, it shouldn't be
necessary to run maven again in debug mode just to find out which of my 200
files is broken.
Comment 3 Mark Thomas 2011-10-28 21:56:41 UTC
With the latest 5.5.x and latest trunk (so I assume 6.0.x and 7.0.x are the same) an invalid JSP triggers a stack trace that names the broken file and the point where the error occurs. A JSP the can be converted to a .java file but then fails to compile reports an error that includes the java class name which is sufficient to identify the source of the error.