Problem when shutting Tomcat down.
There are different causes for this problem, and to find the right fix you need to understand exactly what is the right cause.
One way to do this is to change how Tomcat is started. Based on the version, you can change the starting script you are using (startup.sh/startup.bat) and change the final call to tomcat.sh/.bat (Tomcat 3.x) or catalina.sh/.bat (Tomcat 4.x), using the parameter "run" instead of the parameter "start". ( if you are not using the startup.sh/.bat file, but you are unsing tomcat.sh/.bat or catalina.sh/.bat, just use the option "run" instead of "start").
This change will not spawn a new window and you will see all the errors in the same window you are working on.