Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Added "hacking with Eclipse" section

...

This section of the FAQ discusses common questions related to Tomcat development.

Questions

  1. Hacking
    1. How do I start hacking Tomcat in Eclipse?
  2. Debugging
    1. How do I configure Tomcat to support remote debugging?
    2. How do I remotely debug Tomcat using Eclipse?
    3. How do I remotely debug Tomcat using NetBeans?
  3. Other
    1. How do I change the monitoring interval for modified resources and application reloading?

Answers

Hacking

Anchor
Q5
Q5

How do I start hacking Tomcat in Eclipse?

Briefly:

No Format

$ svn checkout http://svn.apache.org/repos/asf/tomcat/trunk
  (or whatever branch you want: clearly, this would be better
  to do directly from within Eclipse but it's easier to describe
  as a command)

$ cd trunk

$ echo "base.path=/path/to/where/tomcat/can/put/its/3rd-party/libs" > build.properties

$ ant ide-eclipse

Then, in Eclipse, go to Preferences | Java/Build Path/Classpath Variables and set the following variables:

No Format

ANT_HOME=path to your Ant install (where lib/ant.jar can be found)
TOMCAT_LIBS_BASE=[whatever you set base.path to above]

If you look in (project root)/res/ide-support/eclipse/java-compiler-errors-warnings.txt, you'll see a set of compiler warnings and import organization rules that you will have to set up manually in your project. If you set those up properly, you are more likely to submit cleaner patches.

Debugging

Anchor
Q1
Q1

How do I configure Tomcat to support remote debugging?

...