DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUGĀ·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=38776>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED ANDĀ·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=38776

           Summary: Jsp generated servlet classes have bad SourceFile
                    attribute
           Product: Tomcat 5
           Version: 5.5.9
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Servlet & JSP API
        AssignedTo: tomcat-dev@jakarta.apache.org
        ReportedBy: [EMAIL PROTECTED]


doing javap on a jsp generated servlet from 5.5.9 starts with:

Compiled from "org.apache.jsp.WEB_002dINF.jsp.components.globalheader_jsp"
public final class org.apache.jsp.WEB_002dINF.jsp.components.globalheader_jsp 
extends org.apache.jasper.runtime.HttpJspBase implements 
org.apache.jasper.runtime.JspSourceDependent
  SourceFile: "org.apache.jsp.WEB_002dINF.jsp.components.globalheader_jsp"

That is, the SourceFile attribute of this class is 
"org.apache.jsp.WEB_002dINF.jsp.components.globalheader_jsp"

But this is incorrect, according to the java class file specification, 
specifically section: 4.7.7 The SourceFile Attribute

"The string referenced by the sourcefile_index item will be interpreted as 
indicating the name of the source file from which this class file was 
compiled. It will not be interpreted as indicating the name of a directory 
containing the file or an absolute path name for the file; such platform-
specific additional information must be supplied by the runtime interpreter or 
development tool at the time the file name is actually used."

That means that for the above class, the SourceFile attribute should just be

"globalheader_jsp.java"

Note, no package or path info, as well as the .java extension.

This wreaks havoc on tools such as BCEL, FindBugs, etc.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to