- This topic has 3 replies, 2 voices, and was last updated 19 years, 10 months ago by Riyad Kalla.
-
AuthorPosts
-
scotchyMemberI 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?
Riyad KallaMemberScotchy, 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?
scotchyMemberOf 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.
Riyad KallaMemberNice job, thank you for posting your findings incase others wish to know the secrets of the valve… 😉
-
AuthorPosts