facebook

[Closed] Being able to trace into Tomcat 5.0

💡
Our Forums Have Moved

For help with installation, bugs reports or feature requests, please head over to our new forums.
Genuitec Community on GitHub

  1. MyEclipse IDE
  2.  > 
  3. Java EE Development (EJB, JSP, Struts, XDoclet, etc.)
Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #259701 Reply

    netname01
    Member

    Hi.

    I am working with a Struts Application and doing a remote debug. I would like to be able to step into Tomcat’s function the same way I can do it with my application programs. The problem is that I don’t know how to setup this in order to allow myeclipse to display Tomcat’s source code.

    Thanks,

    Alberto

    #259716

    Riyad Kalla
    Member

    Alberto,
    You need to make sure of a few things first:
    1) you are using JDK 1.4+ to run both MyEclipse and Tomcat
    2) you are using MyEclipse to launch Tomcat
    3) You are launching Tomcat in debug mode

    If so, then just set break points wherever you’d like and you will hit them as you run the pages through your browser.

    TIP: using JDK 1.5.0_08 to run both MYEclipse and Tomcat, and upgrading Tomcat to version 5.5 should given you better JSP debugging results.

    #259854

    netname01
    Member

    Riyad,

    Thanks for your answer. But where do I enter the path to Tomcat’s source code in order to really be able to trace Tomcat’s programs running my JSP

    Thanks,

    #259881

    Riyad Kalla
    Member

    MyEclipse automatically reads the source-map that it gets back from Tomcat to map JSP line numbers, that is why the things I Mention are all required ot make sure it’s supported.

    If you mean how do you actualy step into the Tomcat source code itself, like the Catalina libraries and such, it’s a bit trickier.

    #259905

    netname01
    Member

    Hi Riyad,

    >> If you mean how do you actualy step into the Tomcat source code itself, like the Catalina libraries and such, it’s a bit trickier.

    Yes, that is exactly what I am looking for.

    Thanks,

    Alberto

    #259910

    arjan.tijms
    Member

    @netname01 wrote:

    Hi Riyad,

    >> If you mean how do you actualy step into the Tomcat source code itself, like the Catalina libraries and such, it’s a bit trickier.

    Yes, that is exactly what I am looking for.

    Uhm, I posted the answer just the other day in another topic:

    http://www.myeclipseide.com/PNphpBB2+file-viewtopic-t-14544.html

    #259928

    Riyad Kalla
    Member

    And now it is an official FAQ item, many thanks to arjan for that: https://www.genuitec.com/forums/topic/tomcat-how-do-you-debug-tomcat-sources/

    #259991

    netname01
    Member

    Arjan,

    Thanks a lot…I’ll give it a try.

    #260229

    arjan.tijms
    Member

    One more thing btw, I forgot to mention you also have to make an extra setting in MyEclipse to prevent the tomcat jar from being deployed.

    Go to Window -> Preferences -> MyEclipse -> J2EE Project -> Web Project -> Deployment -> Library Deployment Policies.

    Switch “Jars on Web Project build-path” off.

    There may be a bug in MyEclipse relating to this. When I first added the tomcat jar to an existing project in the mentioned directory without unchecking the “Jars on Web Project build-path” option, the jar didn’t get deployed. A while back I had to do a completely new checkout, and now it -did- get deployed. When the latter happens, web projects fail to launch (of course).

    Note that if you happen to have other jars on your build path which are not in web-inf/lib, they also will not get deployed (e.g. the junit.jar added by Eclipse). Actually it would be better if MyEclipse also offered an exclude list for library deployment.

    #260242

    Riyad Kalla
    Member

    Exclude deployment lists is on our short list of “Riyad won’t stop bothering management for these”. They are working on the validation exclude list right now for 5.0.3.

Viewing 10 posts - 1 through 10 (of 10 total)
Reply To: [Closed] Being able to trace into Tomcat 5.0

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