Tuesday, January 18, 2011

Tomcat Configuration


Setting JAVA_HOME and CATALINA_HOME

Before running Tomcat on your computer, the JAVA_HOME and CATALINA_HOME environmental variables must be set correctly.

  • If you do not currently have the JAVA_HOME and CATALINA_HOME environmental variables defined or are unsure about whether they are defined correctly, complete the following steps to do that.

For Windows 95, 98, or ME

  1. Make a backup of your autoexec.bat file.(As you may have more than one autoexec.bat file on your system, ensure that you are working with the autoexec.bat file that is on your main booting device, for example, C:\autoexec.bat.)
  2. Using Notepad (or any other plain text editor), edit your autoexec.bat file.
  3. At the end of the autoexec.bat file, type set JAVA_HOME=�path� (where �path� is the path to your JVM, e.g., C:\Program Files\Java).
  4. On the next line of the file, type set CATALINA_HOME=�path� (where �path� is the path to Tomcat, e.g., C:\Program Files\Apache Tomcat 4.0).
  5. Save the autoexec.bat file by selecting File and then Save.
  6. Close the editor window.
  7. Restart your computer.
  8. Complete

For Windows 2000

  1. Right click on My Computer.
  2. Select Properties.
  3. Select the Advanced tab.
  4. Select the Environmental Variables button.
  5. Under the System Variable group, select New.
  6. In the Variable Name field, type JAVA_HOME.
  7. In the Variable Value field, type the name of the path to your JVM (e.g., C:\Program Files\Java).
  8. Select OK.
  9. Under the System Variable group, select New.
  10. In the Variable Name field, type CATALINA_HOME.
  11. In the Variable Value field, type the name of the path to Tomcat (e.g., C:\Program Files\Apache Tomcat 4.0).
  12. Select OK.
  13. Select OK.
  14. Select OK.
  15. Complete

For Windows NT

  1. Right click on My Computer.
  2. Select Properties.
  3. Select the Environment tab
  4. In the Variable Name field under the User Variables for Administrator group, type JAVA_HOME.
  5. In the Variable Value field under the User Variables for Administrator group, type the name of the path to the JVM (e.g., C:\Program Files\Java).
  6. Select Set.
  7. In the Variable Name field under the User Variables for Administrator group, type CATALINA_HOME.
  8. In the Variable Value field under the User Variables for Administrator group, type the name of the path to Tomcat (e.g., C:\Program Files\Apache Tomcat 4.0).
  9. Select Set.
  10. Select OK.
  11. Complete

For Unix-compatible environments

  1. Export the JAVA_HOME Environmental Variable (e.g., type
    export JAVA_HOME=/usr/java/j2sdk1.4.1 in the terminal window).
  2. Export the CATALINA_HOME Environmental Variable (e.g., type
    export CATALINA_HOME=/usr/local/jakarta-tomcat-4.0.5 in the terminal window).
  3. Complete

No comments:

Post a Comment