You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Marc Logemann <de...@logemann.info> on 2002/07/11 13:14:45 UTC

Debugging Servlets with IDEA (or just an IDE)

Hi,

Tomcat 4.0.4 on Windows

i am one of these IDEA guys who frequently want to debug servlets in the
IDE. IntelliJ suggests to integrate tomcat into the "RUN" proccess so that you can
test servlets and get the output to IDE console and of course being able to add
breakpoints and stuff.

Here is the startup for IDEA (this could be used for any other IDE also IMO)

Main Class: org.apache.catalina.startup.Bootstrap

VM Parms: -Djava.endorsed.dirs="c:\development\java\tomcat\bin;c:\development\java\tomcat\common\lib"
-Dcatalina.base="c:\development\java\tomcat"
-Dcatalina.home="c:\development\java\tomcat"
-Djava.io.tmpdir="c:\development\java\tomcat\temp"

Program Parms: start

WorkDir: c:\development\java\tomcat

In fact everything seems to work fine, until you reach some special issues:

- using /manager to reload, stop/start web-application
- using JNDI to obtain DataSources or whatever

the first issue is heavy, cause after i have done changes to the webapp, i normally
stop the webapp via /manager (with ANT task), copy the new classes to the webapp folder
and then do a "start" via /manager. And again each log says that /manager did a good job.
I ve also done it with "reload" of course. But the realitiy is, that tomcat (still running
under IDEA) is still using the old classes.

the second issue with JDNI is also somehow crazy, i am just not able to do a lookup on any
object.

its for sure no config thing, cause when i use the same insallation and start it on the shell,
everything works as exptected.

Now i am wondering where is the difference between calling "bootstrap.jar start" on the DOS
shell and calling the same via some tool.

Has anyone experience with tomcat integration in IDEs especially in IDEA? Or has someone ideas
what could go wrong?

thx


---
greetings from
Marc Logemann
Homebase @ www.logemann.info


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>