tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From andreas.ro...@jayway.se (Andreas Ronge)
Subject Debugging JSP via JDWP
Date Tue, 04 Sep 2001 15:03:38 GMT
Hi

I have been trying for a few days now to debug JSP pages via the JDWP
protocol without any success.
Has someone tried this  ?

I start tomcat via the following ant file:

<target depends="init" name="start">
       <java classname="org.apache.catalina.startup.Bootstrap" fork="yes">
            <sysproperty key="java.compiler" value="NONE"/>
            <sysproperty key="catalina.home" path="${tomcat.root}"/>
            <jvmarg value="-classic"/>
            <jvmarg value="-Xdebug"/>
            <jvmarg value="-Xnoagent"/>
            <jvmarg
value="-Xrunjdwp:transport=dt_socket,server=y,address=12999,suspend=n"/>
            <arg value="start"/>
           <classpath>
             <pathelement location="${tomcat.root}/bin/bootstrap.jar"/>
             <pathelement location="C:/dev/jdk1.3.1/lib/tools.jar"/>
             <pathelement
location="${tomcat.root}/server/lib/catalina.jar"/>
             <pathelement location="${tomcat.root}/server/lib/jaxp.jar"/>
             <pathelement location="${tomcat.root}/server/lib/warp.jar"/>
             <pathelement
location="${tomcat.root}/server/lib/jakarta-regexp-1.2.jar"/>
             <pathelement location="${tomcat.root}/server/lib/crimson.jar"/>
             <pathelement location="${tomcat.root}/lib/jasper-runtime.jar"/>
             <pathelement
location="${tomcat.root}/jasper/jasper-compiler.jar"/>
             <pathelement location="${tomcat.root}/common/lib/servlet.jar"/>
           </classpath>
       </java>
    </target>

I'm using NetBeans to debug tomcat via JDWP socket port 12999
I have precompiled the JSP page but tomcat does not use it.

keeps the servlet class cached in memory.
(1)   Connecting to andreasronge:12999
(2)  Breakpoint reached at line ? in class users_jsp by thread
HttpProcessor[8080][4].
(3)   Thread HttpProcessor[8080][4] stopped at users_jsp._jspService line
57 - unavailable source file.
At (3) the debugger somehow changed class file from the precompiled
users_jsp file to
users_jsp._jspService that does not exist (probably in memory)

It does not even work with servlet mapping:

            <servlet>
              <servlet-name>users_jsp</servlet-name>
              <servlet-class>users_jsp</servlet-class>
            </servlet>

            <servlet-mapping>
              <servlet-name>users_jsp</servlet-name>
              <url-pattern>/agust</url-pattern>
            </servlet-mapping>


I am using tomcat 4.0-b7 and Debug via NetBeans 3.2

Sincerly
Andreas






Mime
View raw message