views:

302

answers:

1

Hi,

I am using sysdeo tomcat plugin 3.2.1 with eclipse 3.5.1 (Galileo) and tomcat 5.5.23 on windows XP. I can get tomcat plugin working in eclipse, and have extracted devloader.zip into [tomcat]\server\classes. I have also updated the context and now it has this entry:

<Context path="/myapp1" reloadable="true" docBase="F:\Work\eclipse_workspace\myapp1" workDir="F:\Work\eclipse_workspace\myapp1\work" >
    <Logger className="org.apache.catalina.logger.SystemOutLogger" verbosity="4" timestamp="true"/>
    <Loader className="org.apache.catalina.loader.DevLoader" reloadable="true" debug="1" useSystemClassLoaderAsParent="false" />
</Context>

I have activated devloader (in Project > Properties > Tomcat > Devloader Classpath) and have 'checked' all my classes and jars, I haven't 'checked' commons-loggin.jar jsp-api.jar, servlet-api.jar.

So on launching tomcat via the plugin, I can get it running with devloader as shown in eclipse console view

[DevLoader] Starting DevLoader
[DevLoader] projectdir=F:\Work\eclipse_workspace\myapp1
[DevLoader] added file:/F:/Work/eclipse_workspace/myapp1/WEB-INF/classes/
[DevLoader] added file:/F:/Work/eclipse_workspace/myapp1/WEB-INF/lib/activation.jar

However, if I even add a single System.out.println into any java file and save it, the whole application gets reloaded (takes ~80 sec) which is as good as stopping/starting tomcat itself. I've tried adding -Xdebug in JAVA_OPTS in the catalina.bat but no luck :(

Can you please guide where I may be doing it wrong..

Please note that I can 'redeploy' the whole application on tomcat but that's not what I need, I am looking to be able to make small changes in java classes 'on-the-fly' while coding/debugging without having to wait for complete app restart. Another annoyance is that restarting tomcat/application causes the session/debug progress to be lost..

Can you please guide me how to go about it.

PS: I am not using any ant/maven scripts explicitly, just relying on eclipse to do the build for me (which it does).

A: 

If you do not requrie devloader to be loaded and by mistake if you have clicked something in Eclipse. OPen server.xml and delete the Context which points to Dev loader... then try starting the Tomcat. You wont be getting any error (provided if you dont require Devloder)

Vani
Hi Vani, Perhaps I was not clear in stating my problem. I want the ability to make changes to java code (while I am debugging it in tomcat/sysdeo/eclipse). My problem is that as soon as I save the java class (with auto build), the tomcat starts reloading the whole application, which wastes 80-100 seconds. So is there a way to 'hot deploy' java classes while the app is running (debugged) in eclipse using sysdeo plugin for tomcat
Gala101