PDA

View Full Version : Running Tomcat in the foreground instead of as a daemon


kjkoster
16-04-2009, 08:05
Dear All,

As a developer, I like to be able to really quickly start and stop Tomcat, as well as see its output immediately.

What I do is run Tomcat in a terminal, starting it with the command "bin/catalina.sh run" instead of "bin/startup.sh". You can then stop Tomcat with ^C and restart with ^C[up arrow][enter]. You can imagine that the latter is burned in my hand muscles. :)

And yes, on your development machine you can use an IDE to get the same effect, but we don't all have the luxury of being able to run a full-fledged application on our laptops. Sometimes you have to run Tomcat on that specific machine or in that specific environment. I'm not sure I would run Eclipse over an ssh tunnel.

Kees Jan

Barry
16-04-2009, 13:23
Depends... Eclipse has support for remote debugging and probably also remote control of containers. You could tunnel these over SSH if you need, but yeah it could be annoying to setup and doing it directly is faster.

Usually I open a few shells with the following:

tomcat.out
application log 1
application log 2
GC log (if needed)


Our applications tend to have a few logs that they write to so I have a script to open these up. With Glassfish it tends to depend on the applications but I always have the server.log and jvm.log open