facebook

Tomcat Valve debugging HOWTO?

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

    scotchy
    Member

    I am curious how to debug a valve I created for Tomcat. I created the valve in a project and exported the .jar file to the tomcat_home/server/lib directory. I added a Valve element to my server.xml in the specific context which is beling loaded. I put a break point on the project in question. Within the MyEclipseIDE I started the tomcat project. (not the valve) project. I put a breakpoint on the valve project. The web project starts but the breakpoint is never reached. I also tried putting a Valve element within the web.xml but this also doesn’t work. Am I missing something?

    #225557 Reply

    Riyad Kalla
    Member

    Scotchy, even though this likely isn’t right, try and make the web project depend on the valve project (make sure they are both open) and then try and debug… since the valve will be a core part of Tomcat and not a webapp, it is not directly supported by MyEclipse, you most likely would need to run Tomcat itself from within Eclipse or attach a remote debugger to the Tomcat process… honestly I have no idea, have you asked on the Tomcat dev list how they work with the Valves and Eclipse?

    #225559 Reply

    scotchy
    Member

    Of course if you tinker enough…

    I actually got it working. This does appear to be a core part of Eclipse as well as allowing Tomcat to remote debug. This I found on another thread in the Forums here. It was more a configuration issue. Due to the fact that the context was loaded in Server.xml and the MyEclipseIDE loads the context for the local project they didn’t appear to know each other existed. I haven’t yet tried debugging both together but I am now able to debug the Valve given the steps I posted above with one minor change and that is to goto the host defined within the server.xml not to the MyEclipseIDE context.

    Thanks for your input.

    #225562 Reply

    Riyad Kalla
    Member

    Nice job, thank you for posting your findings incase others wish to know the secrets of the valve… 😉

Viewing 4 posts - 1 through 4 (of 4 total)
Reply To: Tomcat Valve debugging HOWTO?

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