You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "Michalski, RafaƂ" <RM...@eragsm.com.pl> on 2000/08/29 14:22:41 UTC

Debuggable servlets from JSP

Hello all

How can I tell Tomcat to generate debuggable servlets
from JSP?
I mean symbolic information for jdb
in class files.

My JSP page is products.jsp in web application pchs and I have noticed
subdirectory named localhost_8080%2Fpchs in directory work.
In the subdirectory, there is a file
_0002fjsp_0002fproducts_0002ejspproducts_jsp_48.java,
obviously generated from my JSP.
This file defines class _0002... in package jsp.
In directory work, I have symlinked localhost_8080%2Fpchs as jsp.
Started Tomcat with (script tomcat.sh)
  $JAVACMD -Xbootclasspath:/usr/java/lib/tools.jar:/usr/java/jre/lib/rt.jar
\
  -Xdebug -Djava.compiler=NONE -Dnes.jsp.enabledebug=1 \
  $TOMCAT_OPTS -Dtomcat.home=${TOMCAT_HOME}  \
  org.apache.tomcat.startup.Tomcat "$@" &
Output from script:
$ Agent password=4s8fhs
Then invoked remote jdb
$ jdb -host localhost -password 4s8fhs
and set source path and breakpoint 
> use /usr/local/tomcat/work
> stop in _0002fjsp_0002fproducts_0002ejspproducts_jsp_48._jspService
Calling JSP page from browser,
I can now walk through the source code with "next", "list",
but any command like
Thread-250[1] print _jspxFactory
triggers message
"_jspxFactory" is not a valid local or class name
which indicates no symbolic information is available.

The Tomcat FAQ "How can I debug my servlet"
doesn't mention this method of dedugging - why?