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=3617>.
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=3617

[EMAIL PROTECTED] changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|FIXED                       |



------- Additional Comments From [EMAIL PROTECTED]  2001-09-18 
08:49 -------
That change isn't right. The "null" has gone, but so has the servlet 
filename and line number, and the result is badly formatted:

  <%@ page import="sss" %>

now produces:

  org.apache.jasper.JasperException: Unable to compile class for JSPimport sss;
         ^
  1 error

Notice the missing separator between "JSP" and "import", the missing
filename and line number, and the misplaced caret.
Also findMapping is called twice unnecesarrily.

Having looked a little further into this, I see that the intent is to map
the servlet errors back to corresponding lines in the JSP page. This has
been implemented for scriplets, but not for directives, so findMapping
simply hasn't got the data it needs. The ideal fix would be to implement
the line number mapping for directives, but that seems like a fairly major
change which is probably not recommended given that the 4.0 release is
imminent, and given that Jasper is being comprehensively rewritten for
some future release.

So for now it makes more sense to just ensure that the error message
is properly generated.

As a minimal fix http://www.greenhills.co.uk/mak/apache/jasper-errormsg.diff
produces:

  org.apache.jasper.JasperException: Unable to compile class for JSP
  /crab/mak/tomcat/work/localhost/example/a$jsp.java:3: Class sss not found in
import.
  import sss;

which at least restores the servlet filename and formatting.

Alternatively http://www.greenhills.co.uk/mak/apache/jasper-errormsg2.diff
is a patch that recognises this case specifically. The advantage is that
the error formatting is more similar to the other cases, the disadvantage
is that it's really not very informative. Note that I have not included
the necesarry translations for _es and _ja.

I would suggest something like the first patch is preferable.

Reply via email to