Re: Debugging Java class generated from JSP

Nathan Fiedler <[email protected]> Fri, 17 Sep 2004 00:28:36 -0700
Newsgroups gmane.comp.java.jswat.user
Organization Blue Marsh Softworks
Message-ID <1095406116.2163.30.camel@chip>
On Thu, 2004-09-16 at 13:05, David Ezzio wrote:
> Hi,
> 
> I am trying to debug the generated class from a JSP page.
> 
> I have put the root source directory in the source path.

What _is_ the root source directory? I need to know that in order to
confirm that it is indeed set correctly.

> I have opened the generated file (maine_jsp.java) at org/apache/jsp 
> within this sourcepath.  I have placed a breakpoint on the first line in 
> the _jspservice method.
> 
> JSwat breaks on the line just fine, but then puts up another source 
> window saying that it could not find the source.  "The source for the 
> class org.apache.jsp.maine_jsp could not be found."  The original jsp 
> file is named "maine.jsp" .

The original file name is not important. What's important is the path to
the 'org' directory. If that is not in the sourcepath, then JSwat will
not find the maine_jsp.java file.

> Curious artifact: The window that I opened says, "maine_jsp.java", but 
> the window that JSwat opens says "maine_jsp".

The second window is a byte code viewer, but without the bytecode since
no one is so enthusiastic as to implement the feature. In that case,
there is no source file, hence the window is appropriately titled.

Have you read the "Classpath, Sourcepath" help page?

n