aspose file tools*
The moose likes Tomcat and the fly likes Configuring tomcat for web deployment Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Configuring tomcat for web deployment" Watch "Configuring tomcat for web deployment" New topic
Author

Configuring tomcat for web deployment

Amruta Agarwal
Greenhorn

Joined: Apr 11, 2007
Posts: 11
Hi,

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?


Thanks & Regards
Amruta.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60041
    
  65

Please take the time to choose the correct forum for your posts. This forum is for questions on beginning Java.

This post has been moved to a more appropriate forum.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60041
    
  65

Originally posted by Amruta Agarwal:

Q01: Is it mandatory to set JAVA_HOME environment variable?


Yes

Q02: Is is mandatory to set CATALINA_HOME env variable?


No

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?


Don't know. I only use Windows when someone much larger than I forces me to.

Q04: Is there any other setting needed to be done before deploying an application on tomcat?


That greatly depends upon the application and what it might need.
Amruta Agarwal
Greenhorn

Joined: Apr 11, 2007
Posts: 11
Thanks for the reply.
But sometimes tomcat does not run properly when catalina_home is not set.
Why is that?

Also I did not understand the answer to the 3rd question.

Thanks & Regards
Amruta
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60041
    
  65

Originally posted by Amruta Agarwal:

But sometimes tomcat does not run properly when catalina_home is not set.
Why is that?


How are you starting tomcat? CATALINA_HOME should automatically be set bt the startup script.

You're not using Windows 98, are you?

Also I did not understand the answer to the 3rd question.


I don't use Windows, so I don't know.
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

A few corrections (clarifications).

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 ]

Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Configuring tomcat for web deployment
 
Similar Threads
Installing Tomcat
JAVA_HOME
Java / Javac not internal command
The file or folder 'java.exe. that this shortcut refers to cannot be found
how to create a java package?