This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Upon installing tomcat: Q01: Is it mandatory to set JAVA_HOME environment variable? Q02: Is is mandatory to set CATALINA_HOME env variable? Q03: In the monitor tomcat window(Apache tomcat properties) > Java tab > Java virtual machine path: does this path get automatically picked up or do we need to set it to the jvm.dll file?
Q04: Is there any other setting needed to be done before deploying an application on tomcat?
If you install Tomcat from the ".exe" version, you don't need to set your JAVA_HOME environment variable. The installer will store the JVM location in the Windows registry for you. You just need to make sure that the install wizard picks up the correct location of your JDK directory. IF you DO set your JAVA_HOME environment variable before running the installer, then it will use that to find the location of your JDK.
When you start Tomcat as a service or from the start menu items, there will be no Tomcat console. All stdout will go to log files in your Tomcat/logs directory. This is also how it works in Unix and (IMHO) is preferable to having the output go to a dos window. There are several text editors that will automatically update a view of a text file as it is updated; giving you 'tail -f' like behavior. This means that you have the output in a file but can also watch it scroll by in real-time. One such free text editor is Textpad.
As Bear mentioned, the startup script will set the CATALINA_HOME environment variable for you. The only time you should have to worry about setting CATALINA_HOME or CATALINA_BASE is if you're trying to run multiple instances of tomcat from the same file base. With disk space as cheap as it is, there is almost no point in doing this anymore. It's easier just to install multiple copies of Tomcat. [ April 30, 2007: Message edited by: Ben Souther ]