You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2008/01/06 22:46:35 UTC
svn commit: r609417 - in /tomcat:
container/tc5.5.x/webapps/docs/changelog.xml current/tc5.5.x/STATUS.txt
jasper/tc5.5.x/src/share/org/apache/jasper/compiler/ErrorDispatcher.java
Author: markt
Date: Sun Jan 6 13:46:34 2008
New Revision: 609417
URL: http://svn.apache.org/viewvc?rev=609417&view=rev
Log:
Fix bug 43757. More accurate code extracts in jasper error messages.
Modified:
tomcat/container/tc5.5.x/webapps/docs/changelog.xml
tomcat/current/tc5.5.x/STATUS.txt
tomcat/jasper/tc5.5.x/src/share/org/apache/jasper/compiler/ErrorDispatcher.java
Modified: tomcat/container/tc5.5.x/webapps/docs/changelog.xml
URL: http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/webapps/docs/changelog.xml?rev=609417&r1=609416&r2=609417&view=diff
==============================================================================
--- tomcat/container/tc5.5.x/webapps/docs/changelog.xml (original)
+++ tomcat/container/tc5.5.x/webapps/docs/changelog.xml Sun Jan 6 13:46:34 2008
@@ -101,6 +101,11 @@
<bug>43702</bug>: Reduce length of unnecessarily long class names for
the inner helper class when using simple tags. (markt)
</fix>
+ <fix>
+ <bug>43757</bug>: Rather than use string matching to work out the line
+ in the JSP with the error, use the SMAP info and the knowledge that for
+ a scriptlet there is a one to one line mapping. (markt)
+ </fix>
</changelog>
</subsection>
<subsection name="Cluster">
Modified: tomcat/current/tc5.5.x/STATUS.txt
URL: http://svn.apache.org/viewvc/tomcat/current/tc5.5.x/STATUS.txt?rev=609417&r1=609416&r2=609417&view=diff
==============================================================================
--- tomcat/current/tc5.5.x/STATUS.txt (original)
+++ tomcat/current/tc5.5.x/STATUS.txt Sun Jan 6 13:46:34 2008
@@ -47,12 +47,6 @@
-1:
0: fhanik, this needs to be reworked completely, so I'm neutral
-* Fix http://issues.apache.org/bugzilla/show_bug.cgi?id=43757
- Use SMAP info rather than string matching to ID line number in JSP
- http://svn.apache.org/viewvc?rev=599605&view=rev
- +1: markt, pero, fhanik
- -1:
-
* Fix http://issues.apache.org/bugzilla/show_bug.cgi?id=43995
Backport fix from TC6. Also fix memory leak
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java?view=diff&r1=583649&r2=583650&pathrev=583650
Modified: tomcat/jasper/tc5.5.x/src/share/org/apache/jasper/compiler/ErrorDispatcher.java
URL: http://svn.apache.org/viewvc/tomcat/jasper/tc5.5.x/src/share/org/apache/jasper/compiler/ErrorDispatcher.java?rev=609417&r1=609416&r2=609417&view=diff
==============================================================================
--- tomcat/jasper/tc5.5.x/src/share/org/apache/jasper/compiler/ErrorDispatcher.java (original)
+++ tomcat/jasper/tc5.5.x/src/share/org/apache/jasper/compiler/ErrorDispatcher.java Sun Jan 6 13:46:34 2008
@@ -526,13 +526,26 @@
page.visit(errVisitor);
Node errNode = errVisitor.getJspSourceNode();
if ((errNode != null) && (errNode.getStart() != null)) {
- javacError = new JavacErrorDetail(
- fname,
- lineNum,
- errNode.getStart().getFile(),
- errNode.getStart().getLineNumber(),
- errMsgBuf,
- ctxt);
+ // If this is a scriplet node then there is a one to one mapping
+ // between JSP lines and Java lines
+ if (errVisitor.getJspSourceNode() instanceof Node.Scriptlet) {
+ javacError = new JavacErrorDetail(
+ fname,
+ lineNum,
+ errNode.getStart().getFile(),
+ errNode.getStart().getLineNumber() + lineNum -
+ errVisitor.getJspSourceNode().getBeginJavaLine(),
+ errMsgBuf,
+ ctxt);
+ } else {
+ javacError = new JavacErrorDetail(
+ fname,
+ lineNum,
+ errNode.getStart().getFile(),
+ errNode.getStart().getLineNumber(),
+ errMsgBuf,
+ ctxt);
+ }
} else {
/*
* javac error line number cannot be mapped to JSP page
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org