tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From (David M. Karr)
Subject Debug generated code from JSP in NB331?
Date Mon, 01 Apr 2002 00:50:16 GMT
I've been able to set up TC4.0.4b2 in NB3.3.1 (by using a JPDA connection).
I've been able to debug Struts Actions and custom tags.

I'd like to be able to step through code generated from JSP compilation.  I've
been able to view the generated code, and set breakpoints in it.  It even stops
at the breakpoint, sort of.  The display in NB says line "?", and it just puts
the cursor at the top of the file.

I would guess this could be happening if Tomcat isn't compiling the generated
classes with "-g".  I've noticed the facilities like
"SunJavaCompiler.setClassDebugInfo()", which if set to true, will apparently
add "-g" to the compiler command line.

However, I don't know how to cause that to happen, either through configuration
files, or by somehow getting access to the SunJavaCompiler object being used.
I've done some searching in the mailing lists and documentation, and obviously,
in the code, but I don't see a way to do this.

I also noticed that although the generated source and classes are in
$CATALINA_HOME/work/Standalone/localhost/<contextname>, each class is in the
"org.apache.jsp" package.  As a result, the package structure doesn't match the
directory structure.  I wonder if that is causing a problem in the debugger.

David M. Karr          ; Java/J2EE/XML/Unix/C++

To unsubscribe:   <>
For additional commands: <>
Troubles with the list: <>

View raw message