facebook

How to debug Tomcat classes?

  1. MyEclipse IDE
  2.  > 
  3. General Development
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #203097 Reply

    Matt Bucknam
    Participant

    I modified one of the Realm classes in my Tomcat 5 installation and would like to debug it. I have added the source to MyEclipse and set a breakpoint but execution doesn’t stop on the breakpoint.

    What is the procedure for adding Tomcat 5 source to MyEclipse and setting breakpoints on it (Even unmodified source)? The Tomcat jar files are not even part of the workspace or project by default?

    #203100 Reply

    Riyad Kalla
    Member

    mbucknam,
    so first step is to add servlet-api.jar and jsp-api.jar to the build path (sounds like you did) and then either get the source from the Tomcat installer (Custom Install->Include Source) or download it then unzip it. The soruce unzips to a dir structure. In side of the “jakarta-servletapi-5” directory there are two dirs, one for jsr152 (JSP 2.0) and jsr154 (Servlet 2.4). You need to attach source to the servlet-api.jar file to the jsr154/src/share directory and the jsp-api.jar to the jsr152/src/share directory. This way the “javax” dir in the source folder maps up with the “javax” package in the root of the JAR file you are attaching to.

    Now you should be able to debug servlet and jsp classes in Tomcat.

    Now assuming you meant some other part of Tomcat, use the information above w.r.t. whatever JAR you are trying to debug.

Viewing 2 posts - 1 through 2 (of 2 total)
Reply To: How to debug Tomcat classes?

You must be logged in to post in the forum log in