Author: markt
Date: Wed Jan 23 19:46:35 2013
New Revision: 1437656

URL: http://svn.apache.org/viewvc?rev=1437656&view=rev
Log:
Improve error message by including the name of the file when the java file 
generated from a tag file cannot be compiled.
Based on a patch by Sheldon Shao.

Modified:
    tomcat/tc7.0.x/trunk/   (props changed)
    
tomcat/tc7.0.x/trunk/java/org/apache/jasper/compiler/DefaultErrorHandler.java
    
tomcat/tc7.0.x/trunk/java/org/apache/jasper/resources/LocalStrings.properties
    
tomcat/tc7.0.x/trunk/java/org/apache/jasper/resources/LocalStrings_es.properties
    tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml

Propchange: tomcat/tc7.0.x/trunk/
------------------------------------------------------------------------------
  Merged /tomcat/trunk:r1437649

Modified: 
tomcat/tc7.0.x/trunk/java/org/apache/jasper/compiler/DefaultErrorHandler.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/jasper/compiler/DefaultErrorHandler.java?rev=1437656&r1=1437655&r2=1437656&view=diff
==============================================================================
--- 
tomcat/tc7.0.x/trunk/java/org/apache/jasper/compiler/DefaultErrorHandler.java 
(original)
+++ 
tomcat/tc7.0.x/trunk/java/org/apache/jasper/compiler/DefaultErrorHandler.java 
Wed Jan 23 19:46:35 2013
@@ -87,7 +87,8 @@ class DefaultErrorHandler implements Err
                 buf.append(details[i].getJspExtract());
             } else {
                 args = new Object[] {
-                        Integer.valueOf(details[i].getJavaLineNumber()) };
+                        Integer.valueOf(details[i].getJavaLineNumber()),
+                        details[i].getJavaFileName() };
                 buf.append(Constants.NEWLINE);
                 buf.append(Constants.NEWLINE);
                 buf.append(Localizer.getMessage("jsp.error.java.line.number",

Modified: 
tomcat/tc7.0.x/trunk/java/org/apache/jasper/resources/LocalStrings.properties
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/jasper/resources/LocalStrings.properties?rev=1437656&r1=1437655&r2=1437656&view=diff
==============================================================================
--- 
tomcat/tc7.0.x/trunk/java/org/apache/jasper/resources/LocalStrings.properties 
(original)
+++ 
tomcat/tc7.0.x/trunk/java/org/apache/jasper/resources/LocalStrings.properties 
Wed Jan 23 19:46:35 2013
@@ -335,7 +335,7 @@ jsp.error.needAlternateJavaEncoding=Defa
 #Error when compiling, used for jsp line number error messages
 jsp.error.single.line.number=An error occurred at line: {0} in the jsp file: 
{1}
 jsp.error.multiple.line.number=\n\nAn error occurred between lines: {0} and 
{1} in the jsp file: {2}\n\n
-jsp.error.java.line.number=An error occurred at line: {0} in the generated 
java file
+jsp.error.java.line.number=An error occurred at line: [{0}] in the generated 
java file: [{1}]
 jsp.error.location=line: {0}, column: {1}
 jsp.error.corresponding.servlet=Generated servlet error:\n
 jsp.error.empty.body.not.allowed=Empty body not allowed for {0}

Modified: 
tomcat/tc7.0.x/trunk/java/org/apache/jasper/resources/LocalStrings_es.properties
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/jasper/resources/LocalStrings_es.properties?rev=1437656&r1=1437655&r2=1437656&view=diff
==============================================================================
--- 
tomcat/tc7.0.x/trunk/java/org/apache/jasper/resources/LocalStrings_es.properties
 (original)
+++ 
tomcat/tc7.0.x/trunk/java/org/apache/jasper/resources/LocalStrings_es.properties
 Wed Jan 23 19:46:35 2013
@@ -337,7 +337,7 @@ jsp.error.multiple.line.number = \n\
     \n\
     Ha tenido lugar un error entre las l\u00EDneas\: {0} y {1} en el archivo 
jsp\: {2}\n\
     \n
-jsp.error.java.line.number = Ha tenido lugar un error en la l\u00EDnea\: {0} 
en el fichero java generado
+jsp.error.java.line.number = Ha tenido lugar un error en la l\u00EDnea\: [{0}] 
en el fichero java generado: [{1}]
 jsp.error.location = l\u00EDnea\: {0}, columna\: {1}
 jsp.error.corresponding.servlet = Error de servlet generado\:\n
 jsp.error.empty.body.not.allowed = Cuerpo vac\u00EDo no permitido para {0}

Modified: tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml?rev=1437656&r1=1437655&r2=1437656&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Wed Jan 23 19:46:35 2013
@@ -101,6 +101,11 @@
         <bug>54240</bug> that broke compilation of JSPs with JspC. Patch
         provided by Sheldon Shao. (markt)
       </fix>
+      <fix>
+        <bug>54466</bug>: Improve error message by including the name of the
+        file when the java file generated from a tag file cannot be compiled.
+        Based on a patch by Sheldon Shao. (markt)
+      </fix>
     </changelog>
   </subsection>
   <subsection name="Cluster">



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to