How do I debug a Dynamic Web Project using the Tomcat bootstrap?
Author: Deron Eriksson
Description: This tutorial describes how to use the Tomcat bootstrap jar to debug an Eclipse dynamic web project
Tutorial created using:
Windows XP || JDK 1.6.0_02 || Eclipse Web Tools Platform 2.0 (Eclipse 3.3.0) || Tomcat 5.5.20
In another tutorial, I showed how to manually create a web project in EclipseSW and then how to debug that project using the TomcatSW bootstrap. The Eclipse Web Tools Platform keeps getting better and better, and there can be benefits to using the Eclipse WTP to generate a Dynamic Web Project. A Server Configuration can be easily set up using the Eclipse WTP to allow a Dynamic Web Project to be run using a variety of servletW containers such as ApacheSW Tomcat. In addition, you can even perform advanced, cool tasks like setting breakpoints in jsp's when you run your web project in a Server Configuration. However, as nice as the server configurations are, sometimes they still act clunky. This week, I've been a student in a Eclipse JSF training class and I've heard many complaints about things like having to restart the server configuration to get very minor changes to sometimes show up. I think Eclipse WTP is a fantastic tool, but I have to say that in my experience, running a web project in Eclipse using a Tomcat bootstrap Debug Configuration gives much greater stability and predictability and tends to minimize things like servlet container restarts. Now let's take a look at how to do this. First off, in Eclipse WTP, create a new Dynamic Web Project using the New Dynamic Web Project Wizard. I'll name my project 'dynamic-web-test' and set the Target Runtime to None (if you are setting up a Server Configuration, you can select the Server here in the Target Runtime). After creating the 'dynamic-web-test' project, I'll create a servlet for testing purposes using the New Servlet Wizard. I'll call the servlet 'TestServlet'. (Continued on page 2) Related Tutorials: |