Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Configuring tomcat for web deployment

 
Amruta Agarwal
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 64848
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64848
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 64848
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic