This will allow you to debug your web applications on Tomcat server. The steps are:
1) Go to your catalina_home/bin.
2) You will find a file called tomcat6w.exe
3) double click on the file and a window will be opened.
4) In the opened window, go to “java” tab.You will find a “text area box” with label as “Java Options”
5) Add the following lines of the code at the the beginning of the text area.
6) start the service: Start menu -> Programs -> Administrative tools -> Component Services -> Services (Local) -> Apache Tomcat -> right-click, Start
7a) Once you have added go to your eclipse and go to Debug–>Debug Configurations and create a new configuration for your project with the port as 8000
(as given above) and save it.
7b) Analogical steps for NetBeans IDE