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


Page: < 1 2 3 >

(Continued from page 1)

After creating TestServlet, we can see that several errors exist in the project in the TestServlet class since classes like HttpServletRequest and HttpServletResponse can't be found. To fix this, let's add the TomcatSW libraries to the project's build path.

TestServlet in Java Editor

If you haven't done so, you can create an EclipseSW ClasspathW Variable called CATALINA_HOME, and point it to your Tomcat installation directory, as shown below.

Classpath Variables in Eclipse

In the 'dynamic-web-test' project's properties, we can go to 'Java Build Path' and go to the Libraries tab and click Add Variable. We can select CATALINA_HOME and then click Extend.

Extending CATALINA_HOME

For simplicity, I selected all of the various Tomcat jarW files and added them to the project's libraries.

Java Build Path Libraries

After doing so, the errors in the TestServlet class disappeared.

TestServlet in Java Editor

(Continued on page 3)

Page: < 1 2 3 >