Re: Configure mulitple installs tomcat 8.5 - catalina_base/catalina_home
Thank you so much for replying. I actually found the issue and it was simple. The starter daemon (which I don't control, unfortunately) wasn't launching the tomcat installs from the proper locations. It was calling the respongindPROD startup.sh from the initiatingPROD dir every time, no matter which tomcat installation it was launching. Fixing that fixed my issue completely. Thank you, Jason T. Countryman From: Christopher Schultz Sent: Thursday, February 24, 2022 3:55 PM To: users@tomcat.apache.org Subject: Re: Configure mulitple installs tomcat 8.5 - catalina_base/catalina_home Jason, On 2/23/22 13:50, Jason Countryman wrote: > Good afternoon, > > On a Centos 7 machine, I have multiple full tomcat installs. > > /var/tomcat_installs/initiatingPROD > /var/tomcat_installs/respondingPROD > > My app uses a spring configuration for cxf, and uses catalina.base to > identify the location for the keystore/truststore, and log4j2 for logging. > When I start each individual tomcat using startup.sh, they report setting > CATALINA_HOME and CATALINA_BASE correctly for their respective locations. > > $ /var/tomcat_installs/initiatingPROD/apache-tomcat-8.5.73/bin/startup.sh > Using CATALINA_BASE: > /var/tomcat_installs/initiatingPROD/apache-tomcat-8.5.73 > Using CATALINA_HOME: > /var/tomcat_installs/initiatingPROD/apache-tomcat-8.5.73 > Using CATALINA_TMPDIR: > /var/tomcat_installs/initiatingPROD/apache-tomcat-8.5.73/temp > Using JRE_HOME:/usr > Using CLASSPATH: > /var/tomcat_installs/initiatingPROD/apache-tomcat-8.5.73/bin/bootstrap.jar:/var/tomcat_installs/initiatingPROD/apache-tomcat-8.5.73/bin/tomcat-juli.jar > Using CATALINA_OPTS: > Tomcat started. > > $ /var/tomcat_installs/respondingPROD/apache-tomcat-8.5.73/bin/startup.sh > Using CATALINA_BASE: > /var/tomcat_installs/respondingPROD/apache-tomcat-8.5.73 > Using CATALINA_HOME: > /var/tomcat_installs/respondingPROD/apache-tomcat-8.5.73 > Using CATALINA_TMPDIR: > /var/tomcat_installs/respondingPROD/apache-tomcat-8.5.73/temp > Using JRE_HOME:/usr > Using CLASSPATH: > /var/tomcat_installs/respondingPROD/apache-tomcat-8.5.73/bin/bootstrap.jar:/var/tomcat_installs/respondingPROD/apache-tomcat-8.5.73/bin/tomcat-juli.jar > Using CATALINA_OPTS: > Tomcat started. > > However, as I follow catalina.out, it appears the values for these are > changed somehow, or I have a configuration error causing this (more likely). > There is all kinds of crosstalk in the respondingPROD catalina.out showing > things from the initiatingPROD installation. The initiatingPROD > catalina.out, however, only has references to what it should. > > I'm setting this up this way so to provide a testing/upgrade path for > tomcat/log4j2 updates, and need each of these installations to be agnostic of > the other, and really need a way to specify for spring where the keystores > are located and they can not be in the classpath. > > There has to be some configuration thing for multiple FULL tomcat > installations that I'm missing here causing all this crosstalk for the > respondingPROD installation, correct? All that looks weird. If startup.sh shows CATALINA_BASE == CATALINA_HOME and both initiatingPROD and respondingPROD have separate values, then then nothing should be interfering. Honestly, if you expect to run them on the same version of Tomcat (oor eve if you don't!) I would recommend having CATALINA_BASE != CATAINA_HOME and have CATALINA_HOME only contain the files that came from ASF directly. Your CATALINA_BASE will contain your application-specific stuff. Anyway, there's no need to complicate things for you like that quite yet, so ... What happens if you try this: 1. Stop both Tomcats 2. Delete catalina.out from both installations 3. Start only the initiatingPROD Tomcat process Look for any log files in EITHER of the two installations. What do you see? -chris - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org This message and any attachments may contain information that is protected by law as privileged and confidential, and is transmitted for the sole use of the intended recipient(s). If you are not the intended recipient, you are hereby notified that any use, dissemination, copying or retention of this e-mail or the information contained herein is strictly prohibited. If you received this e-mail in error, please immediately notify the sender by e-mail, and permanently delete this e-mail.
Re: Configure mulitple installs tomcat 8.5 - catalina_base/catalina_home
Jason, On 2/23/22 13:50, Jason Countryman wrote: Good afternoon, On a Centos 7 machine, I have multiple full tomcat installs. /var/tomcat_installs/initiatingPROD /var/tomcat_installs/respondingPROD My app uses a spring configuration for cxf, and uses catalina.base to identify the location for the keystore/truststore, and log4j2 for logging. When I start each individual tomcat using startup.sh, they report setting CATALINA_HOME and CATALINA_BASE correctly for their respective locations. $ /var/tomcat_installs/initiatingPROD/apache-tomcat-8.5.73/bin/startup.sh Using CATALINA_BASE: /var/tomcat_installs/initiatingPROD/apache-tomcat-8.5.73 Using CATALINA_HOME: /var/tomcat_installs/initiatingPROD/apache-tomcat-8.5.73 Using CATALINA_TMPDIR: /var/tomcat_installs/initiatingPROD/apache-tomcat-8.5.73/temp Using JRE_HOME:/usr Using CLASSPATH: /var/tomcat_installs/initiatingPROD/apache-tomcat-8.5.73/bin/bootstrap.jar:/var/tomcat_installs/initiatingPROD/apache-tomcat-8.5.73/bin/tomcat-juli.jar Using CATALINA_OPTS: Tomcat started. $ /var/tomcat_installs/respondingPROD/apache-tomcat-8.5.73/bin/startup.sh Using CATALINA_BASE: /var/tomcat_installs/respondingPROD/apache-tomcat-8.5.73 Using CATALINA_HOME: /var/tomcat_installs/respondingPROD/apache-tomcat-8.5.73 Using CATALINA_TMPDIR: /var/tomcat_installs/respondingPROD/apache-tomcat-8.5.73/temp Using JRE_HOME:/usr Using CLASSPATH: /var/tomcat_installs/respondingPROD/apache-tomcat-8.5.73/bin/bootstrap.jar:/var/tomcat_installs/respondingPROD/apache-tomcat-8.5.73/bin/tomcat-juli.jar Using CATALINA_OPTS: Tomcat started. However, as I follow catalina.out, it appears the values for these are changed somehow, or I have a configuration error causing this (more likely). There is all kinds of crosstalk in the respondingPROD catalina.out showing things from the initiatingPROD installation. The initiatingPROD catalina.out, however, only has references to what it should. I'm setting this up this way so to provide a testing/upgrade path for tomcat/log4j2 updates, and need each of these installations to be agnostic of the other, and really need a way to specify for spring where the keystores are located and they can not be in the classpath. There has to be some configuration thing for multiple FULL tomcat installations that I'm missing here causing all this crosstalk for the respondingPROD installation, correct? All that looks weird. If startup.sh shows CATALINA_BASE == CATALINA_HOME and both initiatingPROD and respondingPROD have separate values, then then nothing should be interfering. Honestly, if you expect to run them on the same version of Tomcat (oor eve if you don't!) I would recommend having CATALINA_BASE != CATAINA_HOME and have CATALINA_HOME only contain the files that came from ASF directly. Your CATALINA_BASE will contain your application-specific stuff. Anyway, there's no need to complicate things for you like that quite yet, so ... What happens if you try this: 1. Stop both Tomcats 2. Delete catalina.out from both installations 3. Start only the initiatingPROD Tomcat process Look for any log files in EITHER of the two installations. What do you see? -chris - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Configure mulitple installs tomcat 8.5 - catalina_base/catalina_home
Good afternoon, On a Centos 7 machine, I have multiple full tomcat installs. /var/tomcat_installs/initiatingPROD /var/tomcat_installs/respondingPROD My app uses a spring configuration for cxf, and uses catalina.base to identify the location for the keystore/truststore, and log4j2 for logging. When I start each individual tomcat using startup.sh, they report setting CATALINA_HOME and CATALINA_BASE correctly for their respective locations. $ /var/tomcat_installs/initiatingPROD/apache-tomcat-8.5.73/bin/startup.sh Using CATALINA_BASE: /var/tomcat_installs/initiatingPROD/apache-tomcat-8.5.73 Using CATALINA_HOME: /var/tomcat_installs/initiatingPROD/apache-tomcat-8.5.73 Using CATALINA_TMPDIR: /var/tomcat_installs/initiatingPROD/apache-tomcat-8.5.73/temp Using JRE_HOME:/usr Using CLASSPATH: /var/tomcat_installs/initiatingPROD/apache-tomcat-8.5.73/bin/bootstrap.jar:/var/tomcat_installs/initiatingPROD/apache-tomcat-8.5.73/bin/tomcat-juli.jar Using CATALINA_OPTS: Tomcat started. $ /var/tomcat_installs/respondingPROD/apache-tomcat-8.5.73/bin/startup.sh Using CATALINA_BASE: /var/tomcat_installs/respondingPROD/apache-tomcat-8.5.73 Using CATALINA_HOME: /var/tomcat_installs/respondingPROD/apache-tomcat-8.5.73 Using CATALINA_TMPDIR: /var/tomcat_installs/respondingPROD/apache-tomcat-8.5.73/temp Using JRE_HOME:/usr Using CLASSPATH: /var/tomcat_installs/respondingPROD/apache-tomcat-8.5.73/bin/bootstrap.jar:/var/tomcat_installs/respondingPROD/apache-tomcat-8.5.73/bin/tomcat-juli.jar Using CATALINA_OPTS: Tomcat started. However, as I follow catalina.out, it appears the values for these are changed somehow, or I have a configuration error causing this (more likely). There is all kinds of crosstalk in the respondingPROD catalina.out showing things from the initiatingPROD installation. The initiatingPROD catalina.out, however, only has references to what it should. I'm setting this up this way so to provide a testing/upgrade path for tomcat/log4j2 updates, and need each of these installations to be agnostic of the other, and really need a way to specify for spring where the keystores are located and they can not be in the classpath. There has to be some configuration thing for multiple FULL tomcat installations that I'm missing here causing all this crosstalk for the respondingPROD installation, correct? Thank you, Jason T. Countryman This message and any attachments may contain information that is protected by law as privileged and confidential, and is transmitted for the sole use of the intended recipient(s). If you are not the intended recipient, you are hereby notified that any use, dissemination, copying or retention of this e-mail or the information contained herein is strictly prohibited. If you received this e-mail in error, please immediately notify the sender by e-mail, and permanently delete this e-mail.
Should c3p0 and postgres libraries be in $CATALINA_HOME/lib or each application's classpath?
I used to put both libraries in CATALINA_HOME, as past experiences made me suspect of memory leaks if any of these 2 dependencies was in each application's classpath. However, the most recent c3p0 version has a dependency to mchange-commons-java-0.2.11.jar (which also needs to be in CATALINA_HOME), which made me re-think if that is the most appropriate location. I added more contextual information (namely, c3p0's configuration in spring) to https://stackoverflow.com/questions/45621073/where-to-put-c3p0-dependency-in-tomcat-container Could you share your experience in defining the location of these two dependencies? Thank you! Miguel
Re: Trouble separating catalina_base and catalina_home in TC 8
On 4/30/2015 2:49 PM, David kerber wrote: I'm having trouble getting the default webapps to start under TC8 when I separate catalina_base and catalina_home. It must be something stupid I'm missing, but I can't think of any place else to check. This is a windows server 2012 R2 server, with JRE 7u75, JRE 8u45, TC 7.0.57 and TC 8.0.21 all installed as 32-bit under Program Files (x86). TC is as a windows service in both cases, and they were installed using the windows service installer .exe. TC7 is set up to use JRE 7, and TC 8 to use JRE8. Everything runs fine under TC7, but I appear to be having some interference when I try to run apps under TC8, not from catalina_home. All the following comments are running TC8. I don't have Konstantin's message on this machine so I can't reply to it, but he got me pointed in the correct direction to get this fixed. The issues was with my set up of the CATALINA_BASE directories. All the install locations were good, but when I set up catalina.base, I also happened to copy the /lib directory, which has all the tomcat jars in it (catalina.jar, etc), so it was picking the TC7 versions of them instead of the ones in the actual install location. Once I got rid of the extra files, everything runs as it should. Thanks! - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Trouble separating catalina_base and catalina_home in TC 8
I'm having trouble getting the default webapps to start under TC8 when I separate catalina_base and catalina_home. It must be something stupid I'm missing, but I can't think of any place else to check. This is a windows server 2012 R2 server, with JRE 7u75, JRE 8u45, TC 7.0.57 and TC 8.0.21 all installed as 32-bit under Program Files (x86). TC is as a windows service in both cases, and they were installed using the windows service installer .exe. TC7 is set up to use JRE 7, and TC 8 to use JRE8. Everything runs fine under TC7, but I appear to be having some interference when I try to run apps under TC8, not from catalina_home. All the following comments are running TC8. Everything works fine when I run the manager app from its original (catalina_home) location, but when I try to move it to catalina_base, it fails, apparently trying to start TC 7. These are the first 30 lines from the stderr log. There are more errors later on in the log, but I believe they are cascading from the initial problems. Specifically, note that it shows CATALINA_HOME as the correct TC8 location, but it says it's starting 7.0.57 (line2). 2015-04-30 18:22:04 Commons Daemon procrun stderr initialized 30-Apr-2015 18:22:06.092 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version: Apache Tomcat/7.0.57 30-Apr-2015 18:22:06.092 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server built: Nov 3 2014 08:39:16 UTC 30-Apr-2015 18:22:06.092 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server number: 7.0.57.0 30-Apr-2015 18:22:06.092 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name: Windows Server 2008 R2 30-Apr-2015 18:22:06.092 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Version: 6.1 30-Apr-2015 18:22:06.092 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Architecture: x86 30-Apr-2015 18:22:06.092 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JAVA_HOME: C:\Program Files (x86)\Java\jre8 30-Apr-2015 18:22:06.092 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Version: 1.8.0_45-b14 30-Apr-2015 18:22:06.092 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor: Oracle Corporation 30-Apr-2015 18:22:06.092 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE: F:\tomcat8_clients 30-Apr-2015 18:22:06.092 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME: C:\Program Files (x86)\Apache Software Foundation\Tomcat 8.0 30-Apr-2015 18:22:06.092 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.home=C:\Program Files (x86)\Apache Software Foundation\Tomcat 8.0 30-Apr-2015 18:22:06.092 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.base=f:\tomcat8_clients 30-Apr-2015 18:22:06.092 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.endorsed.dirs=C:\Program Files (x86)\Apache Software Foundation\Tomcat 8.0\endorsed 30-Apr-2015 18:22:06.092 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.io.tmpdir=f:\tomcat8_clients\temp 30-Apr-2015 18:22:06.092 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager 30-Apr-2015 18:22:06.092 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.config.file=f:\tomcat8_clients\conf\logging.properties 30-Apr-2015 18:22:06.092 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -DWebSira.configFileName=F:\tomcat8_clients\PelicanWebSIRA.properties 30-Apr-2015 18:22:06.092 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: exit 30-Apr-2015 18:22:06.107 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Xms128m 30-Apr-2015 18:22:06.107 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Xmx256m 30-Apr-2015 18:22:06.107 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files (x86)\Apache Software Foundation\Tomcat 8.0\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\ProgramData\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\SQL Anywhere 12\bin64;C:\Program Files\SQL Anywhere 12\bin32;;. 30-Apr-2015 18:22:06.357 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing
Re: Trouble separating catalina_base and catalina_home in TC 8
2015-04-30 21:49 GMT+03:00 David kerber dcker...@verizon.net: I'm having trouble getting the default webapps to start under TC8 when I separate catalina_base and catalina_home. It must be something stupid I'm missing, but I can't think of any place else to check. This is a windows server 2012 R2 server, with JRE 7u75, JRE 8u45, TC 7.0.57 and TC 8.0.21 all installed as 32-bit under Program Files (x86). TC is as a windows service in both cases, and they were installed using the windows service installer .exe. TC7 is set up to use JRE 7, and TC 8 to use JRE8. Everything runs fine under TC7, but I appear to be having some interference when I try to run apps under TC8, not from catalina_home. All the following comments are running TC8. Everything works fine when I run the manager app from its original (catalina_home) location, but when I try to move it to catalina_base, it fails, apparently trying to start TC 7. These are the first 30 lines from the stderr log. There are more errors later on in the log, but I believe they are cascading from the initial problems. Specifically, note that it shows CATALINA_HOME as the correct TC8 location, but it says it's starting 7.0.57 (line2). 2015-04-30 18:22:04 Commons Daemon procrun stderr initialized 30-Apr-2015 18:22:06.092 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version: Apache Tomcat/7.0.57 30-Apr-2015 18:22:06.092 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server built: Nov 3 2014 08:39:16 UTC 30-Apr-2015 18:22:06.092 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server number: 7.0.57.0 30-Apr-2015 18:22:06.092 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name: Windows Server 2008 R2 30-Apr-2015 18:22:06.092 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Version: 6.1 30-Apr-2015 18:22:06.092 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Architecture: x86 30-Apr-2015 18:22:06.092 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JAVA_HOME: C:\Program Files (x86)\Java\jre8 30-Apr-2015 18:22:06.092 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Version: 1.8.0_45-b14 30-Apr-2015 18:22:06.092 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor: Oracle Corporation 30-Apr-2015 18:22:06.092 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE: F:\tomcat8_clients 30-Apr-2015 18:22:06.092 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME: C:\Program Files (x86)\Apache Software Foundation\Tomcat 8.0 1) It is rather possible to install Tomcat 7 into directory named Tomcat 8.0. Check what jars are actually there. The version number comes from a file in catalina.jar named org/apache/catalina/util/ServerInfo.properties 30-Apr-2015 18:22:06.092 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.home=C:\Program Files (x86)\Apache Software Foundation\Tomcat 8.0 30-Apr-2015 18:22:06.092 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.base=f:\tomcat8_clients 2) OK, catalina.home and catalina.base system properties are present. 30-Apr-2015 18:22:06.092 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.endorsed.dirs=C:\Program Files (x86)\Apache Software Foundation\Tomcat 8.0\endorsed 30-Apr-2015 18:22:06.092 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.io.tmpdir=f:\tomcat8_clients\temp 30-Apr-2015 18:22:06.092 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager 30-Apr-2015 18:22:06.092 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.config.file=f:\tomcat8_clients\conf\logging.properties 30-Apr-2015 18:22:06.092 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -DWebSira.configFileName=F:\tomcat8_clients\PelicanWebSIRA.properties 30-Apr-2015 18:22:06.092 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: exit 30-Apr-2015 18:22:06.107 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Xms128m 30-Apr-2015 18:22:06.107 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Xmx256m 30-Apr-2015 18:22:06.107 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files (x86)\Apache Software Foundation\Tomcat 8.0\bin;C:\Windows\Sun\Java\bin;C
Created a CATALINA_BASE seperate directory tree(port 8081) and can no longer access CATALINA_HOME on port 8080
Tomcat 8.0.15 binary Debian 7.7.0 wheezy Hi. I created a new directory copying the $CATALINA_HOME/conf and creating new common logs temp server shared work webapps subdirectories.I have altered the port numbers In the conf/server.xml file and set $CATALINA_BASE in /etc/profile.Prior to restarting , I could reach $CATALINA_HOME on port 8080 but now I can only reach $CATALINA_BASE on port 8081.I don't know If this Is how It should be when creating a Tomcat Instance.Any help would be appreciated.
Re: Created a CATALINA_BASE seperate directory tree(port 8081) and can no longer access CATALINA_HOME on port 8080
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Nikolas, (I don't know what happened to your formatting, but this message was nearly unreadable.) On 11/20/14 11:18 AM, Nikolas Nikolaou wrote: Tomcat 8.0.15 binary Debian 7.7.0 wheezy Hi. I created a new directory copying the $CATALINA_HOME/conf and creating new common logs temp server shared work webapps subdirectories.I have altered the port numbers In the conf/server.xml file and set $CATALINA_BASE in /etc/profile.Prior to restarting , I could reach $CATALINA_HOME on port 8080 but now I can only reach $CATALINA_BASE on port 8081.I don't know If this Is how It should be when creating a Tomcat Instance.Any help would be appreciated. Setting CATALINA_BASE in /etc/profile is probably a mistake. CATALINA_HOME should point to where Tomcat has been installed. CATALINA_BASE should point to where a configuration of Tomcat has been set up. They work together. You can set up two CATALINA_BASEs and then launch two Tomcats, both installed in CATALINA_HOME but configured in each CATALINA_BASE. Please read the Advanced section of RUNNING.txt that comes with Tomcat for details. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1 Comment: GPGTools - http://gpgtools.org iQIcBAEBCAAGBQJUbiybAAoJEBzwKT+lPKRYmEgP/0fckCJT00RvXwug3nyh6HRM mxjPyzzhL0kptHDQJb8DkCmTfgM9vRtb5Shv+FdphjYESlJUUe6zWPnBrYy5EoXg mRhMlwc5rEHiuhwMgyZUIUHa6xmkd4M63F2HgyQx+goyZhbyBbDS5iJ+uUI0ibd+ u+qTZa5ZOfDhypwaIGNDhMbhJHGDLAg8sCyeUbQg4YcQP3XYf7fs9+s2mpfYFh6O 6xBxuaEYGWV3jQ0e6yGbg8d62OT/Y37pJGMAoR7lK9Q3AiwRNbHcMe8v4D5r6Ezr BfDndvFKyxcouFLmBxbJVdTEW7TaGuV8Utd/yEwRmz8PbiZqZGkSlE11klLegCnX tMH3RBHI3KqoC7aGZSiRHgoDuh7WXgV5i2GrPRmHEKoqgkG2BBMQm5COmvgV5ppd 5Id1KTNVmDT9QpT7tlbgR+IgjJNlPPOHAOaVR0WxBBpt7fR2JS8CCuhm3bmUavHf qzOYNUTVdiDz4PaRuZC8jS5aq1oHyCuqHhAeQ9fm2wQL/chpf95OSInHm8oRtlXk s4WA7y/49UDN/JvqWG4LPXrlYFftIxbSHregHWNR4JhxXSqeAJsdosGNCdY02amz WVBA8H9C/XtZhiaZT7p43uIDd++9VguU/bSpaZU4n4fCxr/10xe8tt9MPwXLZWGc jjvogv+LjkPDaEcfi3J1 =6alp -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Created a CATALINA_BASE seperate directory tree(port 8081) and can no longer access CATALINA_HOME on port 8080
On Thu, 20/11/14, Christopher Schultz ch...@christopherschultz.net wrote: Subject: Re: Created a CATALINA_BASE seperate directory tree(port 8081) and can no longer access CATALINA_HOME on port 8080 To: Tomcat Users List users@tomcat.apache.org Date: Thursday, 20 November, 2014, 20:02 -BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Nikolas, (I don't know what happened to your formatting, but this message was nearly unreadable.) On 11/20/14 11:18 AM, Nikolas Nikolaou wrote: Tomcat 8.0.15 binary Debian 7.7.0 wheezy Hi. I created a new directory copying the $CATALINA_HOME/conf and creating new common logs temp server shared work webapps subdirectories.I have altered the port numbers In the conf/server.xml file and set $CATALINA_BASE in /etc/profile.Prior to restarting , I could reach $CATALINA_HOME on port 8080 but now I can only reach $CATALINA_BASE on port 8081.I don't know If this Is how It should be when creating a Tomcat Instance.Any help would be appreciated. Setting CATALINA_BASE in /etc/profile is probably a mistake. CATALINA_HOME should point to where Tomcat has been installed. CATALINA_BASE should point to where a configuration of Tomcat has been set up. They work together. You can set up two CATALINA_BASEs and then launch two Tomcats, both installed in CATALINA_HOME but configured in each CATALINA_BASE. Please read the Advanced section of RUNNING.txt that comes with Tomcat for details. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1 Comment: GPGTools - http://gpgtools.org iQIcBAEBCAAGBQJUbiybAAoJEBzwKT+lPKRYmEgP/0fckCJT00RvXwug3nyh6HRM mxjPyzzhL0kptHDQJb8DkCmTfgM9vRtb5Shv+FdphjYESlJUUe6zWPnBrYy5EoXg mRhMlwc5rEHiuhwMgyZUIUHa6xmkd4M63F2HgyQx+goyZhbyBbDS5iJ+uUI0ibd+ u+qTZa5ZOfDhypwaIGNDhMbhJHGDLAg8sCyeUbQg4YcQP3XYf7fs9+s2mpfYFh6O 6xBxuaEYGWV3jQ0e6yGbg8d62OT/Y37pJGMAoR7lK9Q3AiwRNbHcMe8v4D5r6Ezr BfDndvFKyxcouFLmBxbJVdTEW7TaGuV8Utd/yEwRmz8PbiZqZGkSlE11klLegCnX tMH3RBHI3KqoC7aGZSiRHgoDuh7WXgV5i2GrPRmHEKoqgkG2BBMQm5COmvgV5ppd 5Id1KTNVmDT9QpT7tlbgR+IgjJNlPPOHAOaVR0WxBBpt7fR2JS8CCuhm3bmUavHf qzOYNUTVdiDz4PaRuZC8jS5aq1oHyCuqHhAeQ9fm2wQL/chpf95OSInHm8oRtlXk s4WA7y/49UDN/JvqWG4LPXrlYFftIxbSHregHWNR4JhxXSqeAJsdosGNCdY02amz WVBA8H9C/XtZhiaZT7p43uIDd++9VguU/bSpaZU4n4fCxr/10xe8tt9MPwXLZWGc jjvogv+LjkPDaEcfi3J1 =6alp -END PGP SIGNATURE- Hi.thanks for replying.I'm not sure about the formatting.I'll check It out. I have setup CATALINA_BASE as you have described. I've only set the environmental variable in etc/profile to point to /opt/tomcat-instance/basedir/ I'll take a look at RUNNING.txt - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat 8.0.14 - Host appBase not defaulting to webapps in $CATALINA_HOME ???
2014-11-20 3:49 GMT+03:00 Barnes, Mark (CORP) mark.bar...@adp.com: Hi, everyone - Could someone please help me to get Tomcat 8.0.14 to find my web apps??? I am trying to upgrade a server from Tomcat 6.x to Tomcat 8.0.14 on Linux. Tomcat does not seem to build the path to the directory containing my web app correctly. The server.xml I have been using for Tomcat 6.x is NOT working with Tomcat 8.0.14. As expected. You must start with Tomcat 8 server.xml and modify things as necessary. http://tomcat.apache.org/migration.html I believe I am using appBase and docBase correctly, but when I start Tomcat I get a series of exceptions that indicate that the directory cannot be found. (Did things change between Tomcat 6 and Tomcat 8?) My $CATALINA_HOME is set to /usr/local/tomcat /usr/local/tomcat is a symbolic link to /usr/local/tomcat8 /user/local/tomcat8 is a symbolic link to /usr/local/apache-tomcat-8.0.14 In my Host element in my server.xml, I have appBase= Why do you think that having an empty appBase is valid? It is a wrong value. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Tomcat 8.0.14 - Host appBase not defaulting to webapps in $CATALINA_HOME ???
Hi, everyone - Could someone please help me to get Tomcat 8.0.14 to find my web apps??? I am trying to upgrade a server from Tomcat 6.x to Tomcat 8.0.14 on Linux. Tomcat does not seem to build the path to the directory containing my web app correctly. The server.xml I have been using for Tomcat 6.x is NOT working with Tomcat 8.0.14. (Yes, I know that it is not recommended to put Contexts in server.xml, but I have no choice about that.) I believe I am using appBase and docBase correctly, but when I start Tomcat I get a series of exceptions that indicate that the directory cannot be found. (Did things change between Tomcat 6 and Tomcat 8?) My $CATALINA_HOME is set to /usr/local/tomcat /usr/local/tomcat is a symbolic link to /usr/local/tomcat8 /user/local/tomcat8 is a symbolic link to /usr/local/apache-tomcat-8.0.14 In my Host element in my server.xml, I have appBase= In my Context element in my Host element, I have docBase=ip My webapps directory is in $CATALINA_HOME: /usr/local/apache-tomcat-8.0.14/webapps The directory ip containing the web app is in $CATALINA_HOME/webapps: /usr/local/apache-tomcat-8.0.14/webapps/ip If appBase= then it's supposed to default to $CATALINA_BASE/webapps, correct? And if CATALINA_BASE is not set, CATALINA_HOME is supposed to be used, no? (I tried setting CATALINA_BASE to the same value but that did not help.) From the 8.0.14 docs: appBase === The Application Base directory for this virtual host. This is the pathname of a directory that may contain web applications to be deployed on this virtual host. You may specify an absolute pathname, or a pathname that is relative to the $CATALINA_BASE directory. See Automatic Application Deployment for more information on automatic recognition and deployment of web applications. If not specified, the default of webapps will be used. For a given Context, if the docBase does not begin with /, then the given value is supposed to be relative to the appBase of the Host. Am I right? From the 8.0.14 docs: docBase === The Document Base (also known as the Context Root) directory for this web application, or the pathname to the web application archive file (if this web application is being executed directly from the WAR file). You may specify an absolute pathname for this directory or WAR file, or a pathname that is relative to the appBase directory of the owning Host. The value of this field must not be set unless the Context element is defined in server.xml or the docBase is not located under the Host's appBase. If a symbolic link is used for docBase then changes to the symbolic link will only be effective after a Tomcat restart or by undeploying and redeploying the context. A context reload is not sufficient. Would someone please help me to understand what is going wrong? Here is the stack trace from catalina.out: = (NOTICE that is lists /usr/local/tomcat8/ip as the main resource set!!! Why isn't webapps in there???) Nov 19, 2014 5:31:24 PM org.apache.catalina.core.ContainerBase startInternal SEVERE: A child container failed during start java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Tomcat-Standalone].StandardHost[localhost].StandardContext[/ip]] at java.util.concurrent.FutureTask.report(FutureTask.java:122) at java.util.concurrent.FutureTask.get(FutureTask.java:192) at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:916) at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:868) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1408) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1398) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Tomcat-Standalone].StandardHost[localhost].StandardContext[/ip]] at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154) ... 6 more Caused by: org.apache.catalina.LifecycleException: Failed to start component [org.apache.catalina.webresources.StandardRoot@7e40b4e2] at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154) at org.apache.catalina.core.StandardContext.resourcesStart(StandardContext.java:4900
RE: Separation of CATALINA_HOME and CATALINA_BASE
-Original Message- From: Mark Thomas [mailto:ma...@apache.org] Sent: 03 November 2014 20:51 To: Tomcat Users List Subject: Re: Separation of CATALINA_HOME and CATALINA_BASE On 03/11/2014 19:38, vince.w...@thomsonreuters.com wrote: snip/ Yes, I've read RUNNING.TXT and I'm left wondering why do I have a catalina class not found if all the tomcat jar files are in CATALINA_HOME/lib Because you are trying to configure a listener that doesn't exist in the version of Tomcat you are trying to use. You can't take a config from one version of Tomcat, apply it to an earlier version and expect it to work. Mark Thank you. I wrongly assumed config would be compatible across different releases of Tomcat 8. Using CATALINA_BASE: C:\tomcat8catalina_base Using CATALINA_HOME: C:\tomcat809 Using CATALINA_TMPDIR: C:\tomcat8catalina_base\temp Using JRE_HOME:C:\jdk1.7.0_55 Using CLASSPATH: C:\tomcat809\bin\bootstrap.jar;C:\tomcat8catalina_base\bin\tomcat- juli.jar Listening for transport dt_shmem at address: tomcat_shared_memory_id 03-Nov-2014 17:45:50.410 SEVERE [main] org.apache.tomcat.util.digester.Digester.startElement Begin event threw exception java.lang.ClassNotFoundException: org.apache.catalina.startup.VersionLoggerListener All these experiments are done running Tomcat under NetBeans so perhaps part of my issue is with NetBeans. The CLASSPATH shown above is a bit on the short side, is it meant to be so short ? Yes. Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Separation of CATALINA_HOME and CATALINA_BASE
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Neven, On 11/3/14 6:42 PM, Neven Cvetkovic wrote: Vince, the current configuration works great: 1) If you are a newbie administrator you are going to use easy-to-use-newbie-friendly configuration. It will get you started, it will get your application working, etc... Great starting point. 2) If you are developer (newbie or expert) and using IDE (Eclipse, Netbeans, IntelliJ) - you are going to use out-of-box tomcat configuration. Single Tomcat instance, no-split configuration. 3) If you are administrator that is upgrading Tomcat, you will just create a process to configure your instance with new Tomcat binaries and copy over the configuration file (most of the stuff is backwards compatible in server.xml within the point-version) + add any shared libraries to new tomcat/lib folder (JDBC drivers, etc...). Again, single-tomcat instance, no-split configuration necessary. Although, may people do like to split for easier upgrades and separation of concerns. 4) If you are administrator that is managing multi-instance environment, you can still get away with copying standard out-of-box Tomcat directory over and over again, for each instance separately. The hassle would be to do the upgrades on many instances. That's why we have CATALINA_HOME for shared stuff (binaries+libraries) and CATALINA_BASE for instance-specific configuration. And in this case you would know about the split directory setup option and would research how to do that effectively. My question is - why do you use CATALINA_BASE if you are using IDE (Netbeans)? If you are developer, there is no need to use split configuration. SLIGHTLY-OFFTOPIC: Although, I would love to see out-of-box setup for additional shared-lib folder, something other than TOMCAT/lib with Tomcat default libraries. Essentially, I would love to separate my customer shared libraries from Tomcat default libraries. I guess - question would be where are CATALINA_HOME/lib JAR files being loaded from? Can we add another directory to scan for libraries to be loaded? Is that configurable? I'm not sure about that, but if the Windows installer could ask the user if they want a unified versus split configuration, that might be nice. The installer could then ask for the location of CATALINA_BASE and offer to create it if necessary. That way, users performing upgrades could specify their existing CATALINA_BASE during installation and not have to go back and re-configure the Windows Service. It would also allow newbies to know that there is an advanced configuration and perhaps go learn about it. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1 Comment: GPGTools - http://gpgtools.org iQIcBAEBCAAGBQJUWPLHAAoJEBzwKT+lPKRYNmsP/3RR7xpKGttbs7iDwAzf29qu EwmQTJd063qcKiDABAkyFfwMy1IQL2/HMM30SL8XFGKhC0kFJZsr/r6kd/Y60cyN Q7+7uDNmvTtDvI4/3j2lTZ4e6gXo7UwTECxYcXinbM+eFnwZFH3xy/u1uC7vv4jV gcJ6TFZInqbArwJGDiCuKsaoPGZe1uqEGhCLJjSAz0Yx3gMZBkhi3wQHIGsZkknA Y9gVw0XAr3oAZHVZMf0bwP+ASH1RwwmRfn5dTgyxnQlAHiJCuA5AKdPtS0L/mkKj m0qk4MLx5+yWJw+Zll0qNkjgCVbZZ44qaDPwQiG2IFQjSj2dRU7a8PTtDjkPtklw SUZN1gqEdozuQPqivePN/QEZWqsnSGUtwRQvfr1cmpi4zcucgS7nyK+HE9ySX9/W H8y61BsTWRV/HHd/d+72/ZxQWH6qR0RKkRQDdwi116bdYb+gRp5B94l0EQ3MHMvB UemvCqvG6sxlB4gKdLjBbFYkn8YUjwRTSrQFbOmpGykW3hAbSnC1qHuwUPQ/ZM2T dqv1cnUn/BCGRUD+0xmiU/8UXim3DAxqaRknwfsWj5Lc5bOkdzWJKvg36fKHI/WD SB7Pcg9vyaV2NFFZh5kJU1xU4DhJ+ZWHqAOW+zzmB0wXqo+mlafkn3YidtMWRTYJ CKZvkdKcmf/6rIiIwRMJ =w+SD -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Separation of CATALINA_HOME and CATALINA_BASE
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Neven, On 11/3/14 6:58 PM, Neven Cvetkovic wrote: On Mon, Nov 3, 2014 at 6:42 PM, Neven Cvetkovic neven.cvetko...@gmail.com wrote: SLIGHTLY-OFFTOPIC: Although, I would love to see out-of-box setup for additional shared-lib folder, something other than TOMCAT/lib with Tomcat default libraries. Essentially, I would love to separate my customer shared libraries from Tomcat default libraries. I guess - question would be where are CATALINA_HOME/lib JAR files being loaded from? Can we add another directory to scan for libraries to be loaded? Is that configurable? I guess, it's easy to add new directories to TOMCAT/conf/catalina.properties file: common.loader= ${catalina.base}/lib,${catalina.base}/lib/*.jar,${catalina.home}/lib,${catalina.home}/lib/*.jar to now read: common.loader= ${catalina.base}/lib,${catalina.base}/lib/*.jar,${catalina.home}/lib,${catalina.home}/lib/*.jar,${catalina.base}/shared,${catalina.base}/shared/*.jar,${catalina.home}/shared,${catalina.home}/shared/*.jar Or just use shared.loader, which is I think what you're asking for. It's blank in a default configuration. What are you thoughts? Would it make sense to keep a separate directory for shared libraries? Should we make it default - to encourage others to create a directory if they want to. - -1 This is confusing and would be surprising if you hadn't intended to use this. The shared loader was disabled by default because nobody could figure out what the heck it was for and basically continually broke their own configurations using it. So, now, everything goes into either lib/ or the web application's WEB-INF/lib and everyone seems to be happy. One can always re-enable the shared loader if you know it exists, in which case you probably know what it's for and why you'd use it. (Hint: use of the shared loader almost never makes any sense). Default behaviour for org.apache.catalina.startup.ClassLoaderFactory is to validate if the file exists/isDirectory/isReadable? That might confuse beginners with a Warning ... I guess Tomcat philosophy is to keep it simple, and extensible - so experts that need to customize things they can, and it is simple and not confusing for beginners. What are your thoughts? I like the current default configuration but I'm willing to entertain other ideas. I just don't like this one in particular (default to split configuration). - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1 Comment: GPGTools - http://gpgtools.org iQIcBAEBCAAGBQJUWPO/AAoJEBzwKT+lPKRYhzwP/21gMhPUd7yVXzk/ImpkZMjr chWiBFFXl8NA76onaHSvFEIAbwSYbpTjboCd2QdDu0qIFi/O4cyirnYhHRfPISGb P+mHu0vg+9Ppze+uk5liQiULutEXdeqt97Sfom/I0j+GJZ2UxqvTGVIrwAa+63Op 7f8yg+wTXWQquz7vTkNwp/fGRBB5EB6ZJetffc0gPrsCG4L8muOobVhgd7wK9Yxf wkWBSXVYTwgOIzlgdYBV2F92EiDMfPihOHQ+jgDHnxebOFc9jCppYcKa96c1LL36 7bTgdSvWNbxJXODCEBVUkoe2rbAr2u7/ZsRWiSOJlfPEBal9Rno/n3C/O6PAhA8J xGB9ixtFyry9Z9V5XY+aUgI0+DKgSoddo2REtcuK0/X+mpyfUXB5A2GqNRaWxXSo 3+hHxfuJw8kLBjaWGswqgMhF0XBS07pNr87QDxldaROeg4Ty0apr6NRdkdSJ8eGE +lvWIC+2dN7ufPo7tt3S0+cCDngvtpPMBdHtp7L1PplN9ilTBmxSYRcl/ZOMaE7J hwSSsYFWRz/40EcTvkO6FCtiuWFW8490pqUuTvfz+ImO+rzSlAlJ2T0vq63Bbfjp EwkVMlV1V421cDUI7JhyVsg1qw6lcsrY3wxPxXUpyGWMAUoQaScCcxGc1mN35D2/ 5ufXCKK6w1sv89jfm5jg =LSsh -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Separation of CATALINA_HOME and CATALINA_BASE
On Tue, Nov 4, 2014 at 9:37 AM, Christopher Schultz ch...@christopherschultz.net wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Neven, On 11/3/14 6:42 PM, Neven Cvetkovic wrote: Vince, the current configuration works great: SLIGHTLY-OFFTOPIC: Although, I would love to see out-of-box setup for additional shared-lib folder, something other than TOMCAT/lib with Tomcat default libraries. Essentially, I would love to separate my customer shared libraries from Tomcat default libraries. I guess - question would be where are CATALINA_HOME/lib JAR files being loaded from? Can we add another directory to scan for libraries to be loaded? Is that configurable? I'm not sure about that, but if the Windows installer could ask the user if they want a unified versus split configuration, that might be nice. The installer could then ask for the location of CATALINA_BASE and offer to create it if necessary. That way, users performing upgrades could specify their existing CATALINA_BASE during installation and not have to go back and re-configure the Windows Service. It would also allow newbies to know that there is an advanced configuration and perhaps go learn about it. - -chris The Tomcat zip file distribution could easily do this now. Add a CATALINA_BASE directory pre-configured with a read-me file that explains to users they can move this directory elsewhere, and update a property that points back to the CATALINA_HOME directory wherever they unzipped that. This would be an easy optional configuration to include for a split configuration.
Re: Separation of CATALINA_HOME and CATALINA_BASE
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Chris, On 11/3/2014 3:08 PM, Christopher Schultz wrote: Mark, On 11/3/14 5:46 PM, Mark Eggers wrote: One of the issues I did run into when using tcnative-1.dll is that I got the following error message: 12.0.0.1 is not a recognized command, and Tomcat failed to start. Moving tcnative-1.dll out of the bin directory fixed the problem. When I specified JRE_HOME in setenv.bat, that also fixed the problem and allowed me to use tcnative-1.dll. I suspect some brokenness in the way NetBeans is handling the JRE_HOME environment variable, since I do have that set system-wide. That's weird. It looks like someone a) mistyped 127.0.0.1 for localhost and b) a script isn't working properly. That should have been 127.0.0.1 Is this Netbeans-only, or does it happen with a stock Tomcat? It is NetBeans-only. Stock 8.0.14 starts fine using startup.bat from Windows Explorer. It's also odd that it has something to do with using tcnative at the same time. That was my quick and dirty thought since I did a grep (cygwin) on all of the files in CATALINA_HOME/bin, and that's the only file that mentioned 127.0.0.1. I moved tcnative-1.dll out of the bin directory and Tomcat started from within NetBeans. I then added a setenv.bat file to the directory which explicitly sets JRE_HOME (even though it's set as a global environment variable). NetBeans was then able to launch Tomcat even with tcnative-1.dll in the bin directory. I'll poke around if I have some time. I'll also see if this occurs on a Linux platform. -chris . . . . just my two cents /mde/ -BEGIN PGP SIGNATURE- Version: GnuPG v2 iQEcBAEBAgAGBQJUWPqxAAoJEEFGbsYNeTwtPooH/jpXYxwe5h97IsuI3kZ8Uprw OC2pTuJI8R95q1nATELEH44uMdWyu9YV6zyT0idkbZmdjU/VeFw7+QrtTop7or4J 4SH3ZTAFcvW4VqaQP3Z24kG1+8T9vpug1RsWnWabh8ioHz6qYKPEgvKhxa+fOopL gCbzEVObywOS/bRexilbZeJYUmQQOncEeVuqAQMpVqCW2yOf4DLJ+jtb7NVAalj+ H+YhVW8Adtip4DR8Kd/C0hIl5R/Gf8uEQjqlVh0SEPS8GwZFo9QJFhS6XD5Q44XK 0cMx/OHD8I6T/OVBAqND+Wf1KXUTfBnjQF9XeJvgs6MVCgMN2LKeutWxKXs5OpY= =Qhdj -END PGP SIGNATURE- --- This email is free from viruses and malware because avast! Antivirus protection is active. http://www.avast.com - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Separation of CATALINA_HOME and CATALINA_BASE
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Leo, On 11/4/14 10:46 AM, Leo Donahue wrote: On Tue, Nov 4, 2014 at 9:37 AM, Christopher Schultz ch...@christopherschultz.net wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Neven, On 11/3/14 6:42 PM, Neven Cvetkovic wrote: Vince, the current configuration works great: SLIGHTLY-OFFTOPIC: Although, I would love to see out-of-box setup for additional shared-lib folder, something other than TOMCAT/lib with Tomcat default libraries. Essentially, I would love to separate my customer shared libraries from Tomcat default libraries. I guess - question would be where are CATALINA_HOME/lib JAR files being loaded from? Can we add another directory to scan for libraries to be loaded? Is that configurable? I'm not sure about that, but if the Windows installer could ask the user if they want a unified versus split configuration, that might be nice. The installer could then ask for the location of CATALINA_BASE and offer to create it if necessary. That way, users performing upgrades could specify their existing CATALINA_BASE during installation and not have to go back and re-configure the Windows Service. It would also allow newbies to know that there is an advanced configuration and perhaps go learn about it. - -chris The Tomcat zip file distribution could easily do this now. Add a CATALINA_BASE directory pre-configured with a read-me file that explains to users they can move this directory elsewhere, and update a property that points back to the CATALINA_HOME directory wherever they unzipped that. This would be an easy optional configuration to include for a split configuration. It already does that, now: The CATALINA_BASE directory is preconfigured to be set to CATALINA_HOME, which is auto-detected by catalina.sh (.bat). CATALINA_BASE contains a readme file (RUNNING.txt) that explains how to change that default. I say that with all due snark, but it's really true: what you are talking about basically exists exactly as you describe. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1 Comment: GPGTools - http://gpgtools.org iQIcBAEBCAAGBQJUWQB0AAoJEBzwKT+lPKRYm5oP/i1vfUFBWIsUmdOxFWIt44fZ ZL2Rco0+WFoUblC5JVjG+vfkv/ZFwUtJnbWVokm5ZZVtnD9LSwHvimeKMaq/wNSr 5yh+M/7cQXGmLEJV6tFf7eLLgHtEmH4WRgoWs/IJ827crxAjr2ae6w5HegWt8Yo1 r99g0x5ZFhlHBy8F1/xjykcTKZVYN3y7i47bcjgb0PDEC7rHB9RhLgveqwKPUU+x wDqKCHj6vLomgLL3adbU/kg5CV6UIgRwuD2Y3xuxHG3a4x3MoPfRhgmAzeetvm4i 9JXZGRbJhqs2mVNTBS3Bzwdj2rAF6LIROGwV/V7wqYDqgEIijssHUnY4GLaYbYOa kw+rpj7ZHfXfvmEFD5bo+7jc7v4Jp4SNQnES1bQJmhCytX/o/a0LjRuJ8H5WkTvA 2SobU1v9TMEtyu1esGjkcsibrCMqxfEmR3K8feKaRks1lCo2nlDKC5LsGrNykfW2 rI74FJyGCFP6sXOqckD6SGlyFXBrY4v6CI4sQc8iAsjPf8uWCyshfu7pWATC5C5g gr3ibDAQEICZWWlz3dlQuQtuf4sSU+XoLTWwyMls3fPMy/9+4BcvSPdcCmSKbGG2 +F9imb8uhrUOpLEhGo5pFBPx3JpjP0eBm1lU3WM3cWwFFBjBqt4GVBO9wFN9fjDg G+QWyQxZO/HdUUywyU6Z =zAEu -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Separation of CATALINA_HOME and CATALINA_BASE
On Tue, Nov 4, 2014 at 10:36 AM, Christopher Schultz ch...@christopherschultz.net wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Leo, On 11/4/14 10:46 AM, Leo Donahue wrote: On Tue, Nov 4, 2014 at 9:37 AM, Christopher Schultz ch...@christopherschultz.net wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Neven, On 11/3/14 6:42 PM, Neven Cvetkovic wrote: Vince, the current configuration works great: SLIGHTLY-OFFTOPIC: Although, I would love to see out-of-box setup for additional shared-lib folder, something other than TOMCAT/lib with Tomcat default libraries. Essentially, I would love to separate my customer shared libraries from Tomcat default libraries. I guess - question would be where are CATALINA_HOME/lib JAR files being loaded from? Can we add another directory to scan for libraries to be loaded? Is that configurable? I'm not sure about that, but if the Windows installer could ask the user if they want a unified versus split configuration, that might be nice. The installer could then ask for the location of CATALINA_BASE and offer to create it if necessary. That way, users performing upgrades could specify their existing CATALINA_BASE during installation and not have to go back and re-configure the Windows Service. It would also allow newbies to know that there is an advanced configuration and perhaps go learn about it. - -chris The Tomcat zip file distribution could easily do this now. Add a CATALINA_BASE directory pre-configured with a read-me file that explains to users they can move this directory elsewhere, and update a property that points back to the CATALINA_HOME directory wherever they unzipped that. This would be an easy optional configuration to include for a split configuration. It already does that, now: The CATALINA_BASE directory is preconfigured to be set to CATALINA_HOME, which is auto-detected by catalina.sh (.bat). CATALINA_BASE contains a readme file (RUNNING.txt) that explains how to change that default. I say that with all due snark, but it's really true: what you are talking about basically exists exactly as you describe. - -chris You are correct (something muffled). If the Tomcat community wants to promote the concept of running multiple instances, then what about: A. A description of that functionality kind of starts on line 68 in RUNNING.txt ((3) Configure Environment Variables). In other words, it's buried. B. That description is aimed at using SCRIPTS not SERVICES to get it working. C. Under Advanced Configuration in RUNNING.txt all newbies really need to know is the In CATALINA_BASE part, because they will read the In CATALINA_HOME part and get confused. D. Are newbies after this kind of configuration for the thrill of being able to run multiple instances or for easier upgrades? My guess is most Tomcat users on Windows don't start their Tomcats with the scripts, a few do and those few are the ones who benefit from this ability, in their web app development. I haven't seen or heard of anyone who has a shared CATALINA_HOME sitting on a Windows file share where developers are free to create their own CATALINA_BASE, but I have only worked a few places in my life. And, I would wonder how coordinating the conflicting ports would be resolved as a group. leo
Re: Separation of CATALINA_HOME and CATALINA_BASE
Thanks Chris! On Tue, Nov 4, 2014 at 10:41 AM, Christopher Schultz ch...@christopherschultz.net wrote: I guess, it's easy to add new directories to TOMCAT/conf/catalina.properties file: common.loader= ${catalina.base}/lib,${catalina.base}/lib/*.jar,${catalina.home}/lib,${catalina.home}/lib/*.jar to now read: common.loader= ${catalina.base}/lib,${catalina.base}/lib/*.jar,${catalina.home}/lib,${catalina.home}/lib/*.jar,${catalina.base}/shared,${catalina.base}/shared/*.jar,${catalina.home}/shared,${catalina.home}/shared/*.jar just use shared.loader, which is I think what you're asking for. It's blank in a default configuration. Yes, I missed that one :) that's what I had in mind. What are you thoughts? Would it make sense to keep a separate directory for shared libraries? Should we make it default - to encourage others to create a directory if they want to. - -1 This is confusing and would be surprising if you hadn't intended to use this. The shared loader was disabled by default because nobody could figure out what the heck it was for and basically continually broke their own configurations using it. So, now, everything goes into either lib/ or the web application's WEB-INF/lib and everyone seems to be happy. One can always re-enable the shared loader if you know it exists, in which case you probably know what it's for and why you'd use it. (Hint: use of the shared loader almost never makes any sense). Agreed, it might confusing. It's probably better idea to pack up your libraries with your apps in WEB-INF/lib. Why do shared loaders almost never make any sense? What kind of problems did you have with shared.loader? However, here's an (rare) example where that might be useful: - one box with limited memory - one tomcat instance hosting X (e.g. 10) applications - all applications are using the same large shared libraries - e.g. 200MB - you don't want to have a separate libraries for each application (your PermGen space will grow significantly otherwise) - it might make sense to move the shared libraries into shared folder (or tomcat/lib) Now, this architecture is probably not the greatest idea. I always strive for the application/process isolation, i.e. one-application-per-tomcat-instance - so I can have independent lifecycles for my apps, but that requires more resources (memory,cpu) or even more hardware. I like the current default configuration but I'm willing to entertain other ideas. I just don't like this one in particular (default to split configuration). So, I do agree - keeping it how it is - is probably the best idea. There is always an option for people that would like to configure that further. Thanks! Neven PS. Apologies for the off-topic diversion :)
Re: Separation of CATALINA_HOME and CATALINA_BASE
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Neven, On 11/4/14 1:05 PM, Neven Cvetkovic wrote: Thanks Chris! On Tue, Nov 4, 2014 at 10:41 AM, Christopher Schultz ch...@christopherschultz.net wrote: I guess, it's easy to add new directories to TOMCAT/conf/catalina.properties file: common.loader= ${catalina.base}/lib,${catalina.base}/lib/*.jar,${catalina.home}/lib,${catalina.home}/lib/*.jar to now read: common.loader= ${catalina.base}/lib,${catalina.base}/lib/*.jar,${catalina.home}/lib,${catalina.home}/lib/*.jar,${catalina.base}/shared,${catalina.base}/shared/*.jar,${catalina.home}/shared,${catalina.home}/shared/*.jar just use shared.loader, which is I think what you're asking for. It's blank in a default configuration. Yes, I missed that one :) that's what I had in mind. What are you thoughts? Would it make sense to keep a separate directory for shared libraries? Should we make it default - to encourage others to create a directory if they want to. - -1 This is confusing and would be surprising if you hadn't intended to use this. The shared loader was disabled by default because nobody could figure out what the heck it was for and basically continually broke their own configurations using it. So, now, everything goes into either lib/ or the web application's WEB-INF/lib and everyone seems to be happy. One can always re-enable the shared loader if you know it exists, in which case you probably know what it's for and why you'd use it. (Hint: use of the shared loader almost never makes any sense). Agreed, it might confusing. It's probably better idea to pack up your libraries with your apps in WEB-INF/lib. Why do shared loaders almost never make any sense? What kind of problems did you have with shared.loader? The only use case I've seen in the past for using a shared loader is when people get paranoid about disk space and want to put all their libraries under shared so they don't have extra copies of e.g. Struts, Spring, etc. when all of their web applications depend on the same set of prerequisites. Of course, then we get endless questions about why their app A doesn't work anymore because they have Spring 3.5 installed in their shared loaded and Spring 4.0 installed in their web application and everything goes all to hell. Basically, they outsmarted themselves and the code is punishing them for it. Tomcat then gets blamed for an inflexible configuration system when Tomcat's flexibility is what allowed them to set up this foolish configuration in the first place. I think most of us are better off without the shared loader. However, here's an (rare) example where that might be useful: - one box with limited memory - one tomcat instance hosting X (e.g. 10) applications - all applications are using the same large shared libraries - e.g. 200MB - you don't want to have a separate libraries for each application (your PermGen space will grow significantly otherwise) - it might make sense to move the shared libraries into shared folder (or tomcat/lib) Agreed, but with the caveats indicated above. Now, this architecture is probably not the greatest idea. I always strive for the application/process isolation, i.e. one-application-per-tomcat-instance - so I can have independent lifecycles for my apps, but that requires more resources (memory,cpu) or even more hardware. Exactly: packaging your application as a self-contained unit means fewer surprises all around. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1 Comment: GPGTools - http://gpgtools.org iQIcBAEBCAAGBQJUWRumAAoJEBzwKT+lPKRY/GYP+wc5EaHui1jmx1JoAtps9Z8W F51OL86n43SpQYN6kpkr2nsew8vpApPX6MXrC8C2XY7AIGzXdclxTmt6Wcf+Rllj bVrGFDe+tO7NKS44M4z4ZRRAlg7xVc0i/E9rHMdkxSPatDbsBM6t08R8x5se/l8/ C/iscgqVGXTmvA52c2xBLJmXiwXCDSb24HDji2kUzNo7irlaX4QxpvAWNUoCF566 4/tv4xvOrfDbo4INfQ+QtJbEMdFJNlJ2GtPYBF9jmsO9DGMUJ5PIkd7E7vbDr0Ac fuKGFEiYpOIKNd9PZ99z/bV+Wo8DIpw5kzAUQArQzXqxq0BvNcErVnY5JM4mAyaE rt4m8TRPCxgwQIuNk9dO7jG25PhDbzw/RWnoiGbbWrV+uBLwpUMU3htMgXuhuAO1 lHa8GaiRFRFBCBeI1yG8PzZEks9DoB5MCXS1tzBIN855bSL4rgYwAMSeTKTfaxzK DCUJHcKQ71Bcq1neMVsVv3SAPCo4gsi4JPquhiJLo3WIqSV/MVX9rshRQ83VnrAO nxobgJFsnXXe8VouPLlR6NyR8w9H6EwoTUM6ARayAUtfSqBaKBym/6Cylc71QnrG HCCxuey8GP7dt8nnSqTkfthmojgfPZl6cAQ1RV2FRcnHcLMtJgPjGfTxuiXBtg1m FCGaUtFhBsdmsQpdYLN4 =dNsl -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Separation of CATALINA_HOME and CATALINA_BASE
On the subject of Newbie-friendly, I think Tomcat would be a whole lot more friendly if CATALINA_HOME and CATALINA_BASE were always totally separate with a minimum of overlap. Although I used Tomcat quite a lot years ago I still consider myself a Tomcat Newbie, mostly because configuration always took days or weeks longer than is reasonable. Now I'm back to Tomcat after years of having it easy using GlassFish. The files might be different now but the grief with configuration is still the same. I've been through numerous configurations with various versions of Tomcat 7 and 8 the furthest I've got is getting a database connection to work. Now having created a minimal CATALINA_BASE I've jumped a few steps back and it won't start. I am sure many of the problems would evaporate if only there were built in and permanent clarity over the separation between CATALINA_HOME and CATALINA_BASE. Yes, I've read RUNNING.TXT and I'm left wondering why do I have a catalina class not found if all the tomcat jar files are in CATALINA_HOME/lib Using CATALINA_BASE: C:\tomcat8catalina_base Using CATALINA_HOME: C:\tomcat809 Using CATALINA_TMPDIR: C:\tomcat8catalina_base\temp Using JRE_HOME:C:\jdk1.7.0_55 Using CLASSPATH: C:\tomcat809\bin\bootstrap.jar;C:\tomcat8catalina_base\bin\tomcat-juli.jar Listening for transport dt_shmem at address: tomcat_shared_memory_id 03-Nov-2014 17:45:50.410 SEVERE [main] org.apache.tomcat.util.digester.Digester.startElement Begin event threw exception java.lang.ClassNotFoundException: org.apache.catalina.startup.VersionLoggerListener All these experiments are done running Tomcat under NetBeans so perhaps part of my issue is with NetBeans. The CLASSPATH shown above is a bit on the short side, is it meant to be so short ? Vince -Original Message- From: Webb, Vince (TR Technology) Sent: 17 October 2014 10:17 To: 'Tomcat Users List' Subject: RE: Separation of CATALINA_HOME and CATALINA_BASE I don’t see their separation as being incompatible with running from a default shell or batch file. It already figures out where to use for CATALINA_HOME, the default place for CATALINA_BASE could be a standard difference from CATALINA_HOME, for example: CATALINA_BASE=$CATALINA_HOME/../catalina_base I imagine this could work OK directly from an extracted tar distribution as it does now. I don't know how much difficulty this would cause for IDE plugin's, they might end up needing less code rather than more. Vince -Original Message- From: Mark Eggers [mailto:its_toas...@yahoo.com.INVALID] Sent: 16 October 2014 20:07 To: Tomcat Users List Subject: Re: Separation of CATALINA_HOME and CATALINA_BASE -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Konstantin, On 10/16/2014 11:52 AM, Konstantin Kolinko wrote: 2014-10-16 22:11 GMT+04:00 vince.w...@thomsonreuters.com: Hello I'm coming back to Tomcat after years using GlassFish. The little that I ever understood of Tomcat 3, 4 and 5 is now decidedly rusty so I've been reading Tomcat 7's RUNNING.txt with interest. The section under the heading: Advanced Configuration - Multiple Tomcat Instances Looks interesting to me even though I have no desire to run multiple instances. Configuring CATALINA_HOME and CATALINA_BASE to be separate directories looks to me like such a winning idea that I'm left wondering, why the default TOMCAT installation puts all that stuff in one directory ? I have not looked to see if Tomcat 8 separates them. 1) The default distributive is friendly to newbies. If you just run startup.sh (startup.bat) it assumes that CATALINA_HOME == CATALINA_BASE == its parent directory and starts successfully. If you separate home and base you have to pass them as environment variables to the scripts. That requires a bit more of configuration from the users. 2) On productive systems you usually configure CATALINA_BASE once (your site) and install a new CATALINA_HOME with each point release. Even if some files such as webapps are not used in the home directory in this configuration, it may be useful to have them for reference. http://tomcat.apache.org/migration.html#Before_upgrading_or_migrating http://tomcat.apache.org/migration-8.html#Upgrading_8.0.x 3) Many 3rd parties (Linux vendors) redistribute Tomcat with separate home and base directories. Best regards, Konstantin Kolinko I think that the combined approach is useful in a number of scenarios. 1. Newbie-friendly Just unzip (untar, install) and go. With the installer I suppose you could have it query where CATALINA_BASE and CATALINA_HOME are to be placed, so the environment variables are constructed and placed in setenv.(bat/sh). If you use the archive rather than the installer, it's up to the user to figure this out. 2. IDE-friendly NetBeans works well with the combined approach. It even uses the standard manager-script role for deployment. Eclipse is not quite as nice
Re: Separation of CATALINA_HOME and CATALINA_BASE
Vince, On Mon, Nov 3, 2014 at 2:38 PM, vince.w...@thomsonreuters.com wrote: On the subject of Newbie-friendly, I think Tomcat would be a whole lot more friendly if CATALINA_HOME and CATALINA_BASE were always totally separate with a minimum of overlap. Why is that? I would argue current setup is very simple and newbie-friendly. Most newbies are going to have a single-instance tomcat running, even developers in their IDEs (Eclipse, NetBeans, IntelliJ, etc...) would probably start with a single Tomcat instance. You want your CATALINA_HOME = CATALINA_BASE in the newbie situation. Actually you don't even want to advertise the difference to the newbies. You probably shouldn't even configure CATALINA_HOME/CATALINA_BASE environment variables, but let the scripts infer from where you are running them. Now, once one graduates pass the newbie-friendly - one can start looking when CATALINA_HOME != CATALINA_BASE is useful. Here are some ideas, why you would maybe want to separate out CATALINA_HOME and CATALINA_BASE: a) when you want to make your Tomcat upgrades easier over time, so you just upgrade your CATALINA_HOME each time and you keep your existing CATALINA_BASE (instance configuration) directory. b) multi-instance environment, when you have multiple Tomcat instances running on the same machine, and you are sick-and-tired of copying entire tomcat directory for each instance and do the upgrades for each instance individually Other than that, I don't see another reason to have CATALINA_HOME and CATALINA_BASE be any different. Although I used Tomcat quite a lot years ago I still consider myself a Tomcat Newbie, mostly because configuration always took days or weeks longer than is reasonable. Now I'm back to Tomcat after years of having it easy using GlassFish. The files might be different now but the grief with configuration is still the same. I've been through numerous configurations with various versions of Tomcat 7 and 8 the furthest I've got is getting a database connection to work. Now having created a minimal CATALINA_BASE I've jumped a few steps back and it won't start. Exactly my point earlier Vince. You ignore setting up CATALINA_HOME/CATALINA_BASE, you let the scripts infer that from where it is being started. And then you just configure your datasource either at the GlobalNamingResources level (e.g at conf/server.xml) or at the Context level (e.g. at conf/Catalina/localhost/myapp.xml). I am sure many of the problems would evaporate if only there were built in and permanent clarity over the separation between CATALINA_HOME and CATALINA_BASE. Yes, I've read RUNNING.TXT and I'm left wondering why do I have a catalina class not found if all the tomcat jar files are in CATALINA_HOME/lib Using CATALINA_BASE: C:\tomcat8catalina_base Using CATALINA_HOME: C:\tomcat809 Using CATALINA_TMPDIR: C:\tomcat8catalina_base\temp Using JRE_HOME:C:\jdk1.7.0_55 Using CLASSPATH: C:\tomcat809\bin\bootstrap.jar;C:\tomcat8catalina_base\bin\tomcat-juli.jar Listening for transport dt_shmem at address: tomcat_shared_memory_id 03-Nov-2014 17:45:50.410 SEVERE [main] org.apache.tomcat.util.digester.Digester.startElement Begin event threw exception java.lang.ClassNotFoundException: org.apache.catalina.startup.VersionLoggerListener All these experiments are done running Tomcat under NetBeans so perhaps part of my issue is with NetBeans. The CLASSPATH shown above is a bit on the short side, is it meant to be so short ? If you are running Tomcat instance in IDE, why do you bother separating out CATALINA_BASE and CATALINA_HOME? Default unzip and play setup work nicely in Eclipse and IntelliJ. I have not played with NetBeans as much, but I am sure it is easy out-of-box setup. Hope that helps! Cheers! Neven
Re: Separation of CATALINA_HOME and CATALINA_BASE
On 03/11/2014 19:38, vince.w...@thomsonreuters.com wrote: snip/ Yes, I've read RUNNING.TXT and I'm left wondering why do I have a catalina class not found if all the tomcat jar files are in CATALINA_HOME/lib Because you are trying to configure a listener that doesn't exist in the version of Tomcat you are trying to use. You can't take a config from one version of Tomcat, apply it to an earlier version and expect it to work. Using CATALINA_BASE: C:\tomcat8catalina_base Using CATALINA_HOME: C:\tomcat809 Using CATALINA_TMPDIR: C:\tomcat8catalina_base\temp Using JRE_HOME:C:\jdk1.7.0_55 Using CLASSPATH: C:\tomcat809\bin\bootstrap.jar;C:\tomcat8catalina_base\bin\tomcat-juli.jar Listening for transport dt_shmem at address: tomcat_shared_memory_id 03-Nov-2014 17:45:50.410 SEVERE [main] org.apache.tomcat.util.digester.Digester.startElement Begin event threw exception java.lang.ClassNotFoundException: org.apache.catalina.startup.VersionLoggerListener All these experiments are done running Tomcat under NetBeans so perhaps part of my issue is with NetBeans. The CLASSPATH shown above is a bit on the short side, is it meant to be so short ? Yes. Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Separation of CATALINA_HOME and CATALINA_BASE
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Vince, On 11/3/14 2:38 PM, vince.w...@thomsonreuters.com wrote: On the subject of Newbie-friendly, I think Tomcat would be a whole lot more friendly if CATALINA_HOME and CATALINA_BASE were always totally separate with a minimum of overlap. Although I used Tomcat quite a lot years ago I still consider myself a Tomcat Newbie, mostly because configuration always took days or weeks longer than is reasonable. Now I'm back to Tomcat after years of having it easy using GlassFish. The files might be different now but the grief with configuration is still the same. I've been through numerous configurations with various versions of Tomcat 7 and 8 the furthest I've got is getting a database connection to work. Now having created a minimal CATALINA_BASE I've jumped a few steps back and it won't start. I am sure many of the problems would evaporate if only there were built in and permanent clarity over the separation between CATALINA_HOME and CATALINA_BASE. Here's my (simplified) prepare-local-tomcat target from our ant build scripts. It takes a CATALINA_HOME and builds a CATALINA_BASE from it and our other revision-controlled configuration files. app.tomcat-home is CATALINA_HOME app.home.dir is CATALINA_BASE app.foo.dir should be obvious from the name/usage conf.dir is our revision-controlled stuff target name=prepare-local-tomcat mkdir dir=${app.home.dir} / mkdir dir=${app.conf.dir} / mkdir dir=${app.webapps.dir} / mkdir dir=${app.log.dir} / mkdir dir=${app.temp.dir} / !-- Prepare and install Tomcat configuration files for the application -- !-- Copy the stock web.xml from the tomcat installation -- copy file=${app.tomcat-home}/conf/web.xml tofile=${app.conf.dir}/web.xml / !-- Copy tomcat-server.xml to server.xml in the local Tomcat conf dir. Use filters to substitute-in the values for the connector and shutdown ports. -- copy file=${conf.dir}/${app.release-type}/tomcat-server-${app.tomcat-version}.xml tofile=${app.conf.dir}/server.xml filtering=yes / /target Basically, all a CATALINA_BASE needs is conf/server.xml, conf/web.xml, a log directory, and a work directory. I haven't bothered checking, but you might not even need conf/web.xml... Tomcat might automatically use the CATALINA_HOME/conf/web.xml if there isn't one in CATALINA_BASE/conf/web.xml. We still use webapps though we could deploy anywhere we wanted to. Yes, I've read RUNNING.TXT and I'm left wondering why do I have a catalina class not found if all the tomcat jar files are in CATALINA_HOME/lib Using CATALINA_BASE: C:\tomcat8catalina_base Using CATALINA_HOME: C:\tomcat809 Using CATALINA_TMPDIR: C:\tomcat8catalina_base\temp Using JRE_HOME: C:\jdk1.7.0_55 Using CLASSPATH: C:\tomcat809\bin\bootstrap.jar;C:\tomcat8catalina_base\bin\tomcat-juli.jar Listening for transport dt_shmem at address: tomcat_shared_memory_id 03-Nov-2014 17:45:50.410 SEVERE [main] org.apache.tomcat.util.digester.Digester.startElement Begin event threw exception java.lang.ClassNotFoundException: org.apache.catalina.startup.VersionLoggerListener It looks like you are trying to use the server.xml file from Tomcat 8.0.14 on Tomcat 8.0.9. The VersionLoggerListener class was introduced relatively recently. If you want to adapt server.xml from one version of Tomcat to another, you should be careful. You have inadvertently downgraded your Tomcat instance and lost functionality. So, basically, you have damaged your Tomcat installation and want to know why it doesn't work. Well, you broke it, so it doesn't work. All these experiments are done running Tomcat under NetBeans so perhaps part of my issue is with NetBeans. The CLASSPATH shown above is a bit on the short side, is it meant to be so short ? Yes. Tomcat's CLASSPATH includes only things within CATALINA_HOME/bin and CATALINA_BASE/bin (in that order). Everything else (like the stuff in CATALINA_HOME/lib and CATALINA_BASE/lib) gets added to a ClassLoader that is used after the server bootstraps itself. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1 Comment: GPGTools - http://gpgtools.org iQIcBAEBCAAGBQJUV+6wAAoJEBzwKT+lPKRYFrkP/iLMieBMpVuAW2FQohnJ+slQ wgCN3kjuK3JCip1zVHZzUWvS2x0hDs+XWrNDLGtk36NDH9++k5z94GQjVukn5vFa yaRKADjmNuLSzEj4dPbj7mFz3Vj0lmkxLLvuslyMQZe9WKqE7qeo8q0aw5v2M1uc h5jZuCS54HdTbioXx2++YeQEaT1jqw6Iuk4acWkaKWS+8B/epXqMHh0yNBkI50un EY+YwOJ1MQ5WbDEFw/nRUkbVMMQHpY6uWPxkqu5Te+JaUPRlnHD6qzhQCCjDJ92y zGnGLkE5koo+cVCpVKosznJCw/ZCnf4Pub7NqtPysXe7smVBrCzMvQ1+IjDw4rUi KK/e+9DtCLhq3HVcY4Nc03xycqADGMVeyASJgdf+ONRS7QhGFh7JJgSw+Xwfk9tM Wu0VB3W2iC87F8Iag6prowFav7AYt4MmYuY224emaOVhmnOgHHGYi+DDAABw6dK9 KCPnFg6IOJaOUuNpCY6UHebVyVibglCsNZTrqRWX0o7vKYnDinEtL8YqwYrgfHZc 9E5RUJJ3kvz+Ptx2mkopS+JLx9Yll1bkOjPjC2k0kesc2gVknlRXzkjYO2I+VxGR b64UnEklwLMkDOBpF2kz/K57sYbPxxR5oJfi3CAGs0ixENyamLWXv3i9d8CXcf+Z 0
RE: Separation of CATALINA_HOME and CATALINA_BASE
Neven Even Tomcat newbies have to do real work that will find its way to a real server. Either of the benefits you described as a) and b) mean CATALINA_HOME and CATALINA_BASE need to be separate on a real server. I would rather get it straight from the outset rather than mess about with a configuration that is going nowhere. NetBeans separates out CATALINA_HOME and CATALINA_BASE, either automatically making its own decisions about the content of CATALINA_BASE or manually by allowing you to specify your own hand crafted directory. I just made the switch from letting NetBeans populate CATALINA_BASE, to doing it myself. Naturally I want to avoid having the same files appear in both directories so I went for minimal content. How much easier it would be if the Tomcat distribution had the correct separation build in. Vince -Original Message- From: Neven Cvetkovic [mailto:neven.cvetko...@gmail.com] Sent: 03 November 2014 20:22 To: Tomcat Users List Subject: Re: Separation of CATALINA_HOME and CATALINA_BASE Vince, On Mon, Nov 3, 2014 at 2:38 PM, vince.w...@thomsonreuters.com wrote: On the subject of Newbie-friendly, I think Tomcat would be a whole lot more friendly if CATALINA_HOME and CATALINA_BASE were always totally separate with a minimum of overlap. Why is that? I would argue current setup is very simple and newbie-friendly. Most newbies are going to have a single-instance tomcat running, even developers in their IDEs (Eclipse, NetBeans, IntelliJ, etc...) would probably start with a single Tomcat instance. You want your CATALINA_HOME = CATALINA_BASE in the newbie situation. Actually you don't even want to advertise the difference to the newbies. You probably shouldn't even configure CATALINA_HOME/CATALINA_BASE environment variables, but let the scripts infer from where you are running them. Now, once one graduates pass the newbie-friendly - one can start looking when CATALINA_HOME != CATALINA_BASE is useful. Here are some ideas, why you would maybe want to separate out CATALINA_HOME and CATALINA_BASE: a) when you want to make your Tomcat upgrades easier over time, so you just upgrade your CATALINA_HOME each time and you keep your existing CATALINA_BASE (instance configuration) directory. b) multi-instance environment, when you have multiple Tomcat instances running on the same machine, and you are sick-and-tired of copying entire tomcat directory for each instance and do the upgrades for each instance individually Other than that, I don't see another reason to have CATALINA_HOME and CATALINA_BASE be any different. Although I used Tomcat quite a lot years ago I still consider myself a Tomcat Newbie, mostly because configuration always took days or weeks longer than is reasonable. Now I'm back to Tomcat after years of having it easy using GlassFish. The files might be different now but the grief with configuration is still the same. I've been through numerous configurations with various versions of Tomcat 7 and 8 the furthest I've got is getting a database connection to work. Now having created a minimal CATALINA_BASE I've jumped a few steps back and it won't start. Exactly my point earlier Vince. You ignore setting up CATALINA_HOME/CATALINA_BASE, you let the scripts infer that from where it is being started. And then you just configure your datasource either at the GlobalNamingResources level (e.g at conf/server.xml) or at the Context level (e.g. at conf/Catalina/localhost/myapp.xml). I am sure many of the problems would evaporate if only there were built in and permanent clarity over the separation between CATALINA_HOME and CATALINA_BASE. Yes, I've read RUNNING.TXT and I'm left wondering why do I have a catalina class not found if all the tomcat jar files are in CATALINA_HOME/lib Using CATALINA_BASE: C:\tomcat8catalina_base Using CATALINA_HOME: C:\tomcat809 Using CATALINA_TMPDIR: C:\tomcat8catalina_base\temp Using JRE_HOME:C:\jdk1.7.0_55 Using CLASSPATH: C:\tomcat809\bin\bootstrap.jar;C:\tomcat8catalina_base\bin\tomcat-juli.jar Listening for transport dt_shmem at address: tomcat_shared_memory_id 03-Nov-2014 17:45:50.410 SEVERE [main] org.apache.tomcat.util.digester.Digester.startElement Begin event threw exception java.lang.ClassNotFoundException: org.apache.catalina.startup.VersionLoggerListener All these experiments are done running Tomcat under NetBeans so perhaps part of my issue is with NetBeans. The CLASSPATH shown above is a bit on the short side, is it meant to be so short ? If you are running Tomcat instance in IDE, why do you bother separating out CATALINA_BASE and CATALINA_HOME? Default unzip and play setup work nicely in Eclipse and IntelliJ. I have not played with NetBeans as much, but I am sure it is easy out-of-box setup. Hope that helps! Cheers! Neven
Re: Separation of CATALINA_HOME and CATALINA_BASE
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Vince, On 11/3/14 4:12 PM, vince.w...@thomsonreuters.com wrote: Even Tomcat newbies have to do real work that will find its way to a real server. Either of the benefits you described as a) and b) mean CATALINA_HOME and CATALINA_BASE need to be separate on a real server. I would rather get it straight from the outset rather than mess about with a configuration that is going nowhere. Separating a unified Tomcat deployment into CATALINA_HOME and CATALINA_BASE is pretty trivial. Your configuration isn't going nowhere. Do you know what's worse than a simple configuration to start that can grow into a complex one? One that is so complex you can't even get started. Have you ever configured Weblogic? There is (or was, back in circa 2001 when I had the misfortune of working on that platform) no such thing as unzip and run bin/startup.sh to launch the server. No, you basically had to go and get trained (at a high cost, by corporate trainers, of course) to do anything at all with the darned thing. If you want to talk about a configuration that is going nowhere, anything that is automatically done by Eclipse, NetBeans, etc. is not going anywhere. NetBeans separates out CATALINA_HOME and CATALINA_BASE, either automatically making its own decisions about the content of CATALINA_BASE or manually by allowing you to specify your own hand crafted directory. I just made the switch from letting NetBeans populate CATALINA_BASE, to doing it myself. Naturally I want to avoid having the same files appear in both directories so I went for minimal content. How much easier it would be if the Tomcat distribution had the correct separation build in. It would be harder for newbies and no real benefit to experts. Let me show you the difference in complexity between deploying Tomcat with a unified versus split configuration: Unified - --- $ wget http://host/path/to/tomcat-x.y.z.tar.gz $ tar xzf http://host/path/to/tomcat-x.y.z.tar.gz $ tomcat-x.y.z/bin/startup.sh Woot! Separated - - $ wget http://host/path/to/tomcat-x.y.z.tar.gz $ tar xzf http://host/path/to/tomcat-x.y.z.tar.gz $ mkdir -p my-tomcat-base/conf $ mkdir -p my-tomcat-base/log $ mkdir -p my-tomcat-base/work $ mkdir -p my-tomcat-base/temp $ mkdir -p my-tomcat-base/webapps $ cp tomcat-x.y.z/conf/server.xml my-tomcat-base/conf $ cp tomcat-x.y.z/conf/web.xml my-tomcat-base/conf (the above step may not actually be necessary) $ cp tomcat-x.y.z/webapps/ROOT my-tomcat-base/webapps $ export CATALINA_HOME=`pwd`/tomcat-x.y.z $ export CATALINA_BASE=`pwd`/my-tomcat-base $ $CATALINA_HOME/bin/startup.sh Done. So, that's not all that complicated when you think about it, but to ask someone who knows nothing about a command-line, working effectively in an operating system, etc. and only knows about programming in Java -- maybe only servlet programming in Java -- to configure the server in the split case is confusing as all hell. Anyone downloading a ZIP or tar archive containing a Tomcat installation would be confused if the archive contained not one but two top-level directories. Also, it would overwrite your split-configuration if you unpacked that archive in the same directory as when you first started. An installer program would have to explain what in the world the split configuration was. Have you ever tried to tell someone how to set up their email? POP versus IMAP? Most users have absolutely no idea what that is, and mail programs give no clue as to which one to choose. The same would be true of CATALINA_HOME versus CATALINA_BASE. (Besides, I truly doubt that any expert system administrators are using the Tomcat Windows Installer to install/upgrade their systems. Maybe I'm wrong, but then again I can't imagine running a Windows server in production. I value my sleep and prefer to build new things instead of holding together configurations with chewing gum and duct tape. Oh, and rebooting all the time.) Anyhow, we can debate this all you want, but I will be -0 or even -1 to a default split-configuration of Tomcat unless someone has a really good idea for how to make it make sense to anyone on their first-touch. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1 Comment: GPGTools - http://gpgtools.org iQIcBAEBCAAGBQJUV/STAAoJEBzwKT+lPKRYwq0QAJis//26ab34xcdAbs1Ths8I 0D4XWjh8cNv+QqvexftR8atf+2mN4NCukeHe95CF7AT0GVF0hd/z6irzRp32OXVd gg8nQkn4u+OjzHC2aCDSHGTDvg2/rkf1RdKqSD84pooB56d6hysMszCdHVZNFKHY 6SCOIFcwiVE/iiaLmV39uyT5tgcMQyAVZ0g9xym3tJHT8pXiFQ4pKZQKxnl4PBhx ob+l1ksb4gaekFV/WIQEr9HLS73FLcHr9rk0VtsM+4HiE8t2XacYKXveewShWXUX +kaFD0Udb5VCqlqMRKKZKw2a9kOh2XYGI7C+itYBHVRUXtW//jtwd2G6fje+5Siz phSB+aq6kHK2iEF4ZxGQ2asqCFrCCBWPfMtrrWScKHrPVYj7suAcLpfk2oaFksGD BER8LT8WRi35L9VbemNMfFPCSFFEyP2Ej7Xa09ZdS4jqd1O8m8ZsWxHDW5JbYL2s bcffVeHhZvglyKHfcciCYzSDdFprsI0qglFgVtRy/E35Gn6FkyS23npHl1zeehhy J/2a/4STTexpMZtC2e1E5nDb+/m3qAn9SkBYW5IxeU9jrYBx1aQeZqt2TxCj4Kt9 GAD5gf3FvX0sAs5UnNNQTe4gf
Re: Separation of CATALINA_HOME and CATALINA_BASE
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Vince, On 11/3/2014 1:12 PM, vince.w...@thomsonreuters.com wrote: Neven Even Tomcat newbies have to do real work that will find its way to a real server. Either of the benefits you described as a) and b) mean CATALINA_HOME and CATALINA_BASE need to be separate on a real server. I would rather get it straight from the outset rather than mess about with a configuration that is going nowhere. NetBeans separates out CATALINA_HOME and CATALINA_BASE, either automatically making its own decisions about the content of CATALINA_BASE or manually by allowing you to specify your own hand crafted directory. Actually, at least in recent versions of NetBeans this is not the default case. The default case is to use CATALINA_HOME and let NetBeans completely control the Tomcat instance. This is the way I normally run NetBeans on my development systems. I rarely use CATALINA_BASE in development, since I just add all of the extra jars to $CATALINA_HOME/lib. I just made the switch from letting NetBeans populate CATALINA_BASE, to doing it myself. Naturally I want to avoid having the same files appear in both directories so I went for minimal content. This is only true if you select the check box in the server creation wizard that is labeled Use Private Configuration Folder (Catalina Base). In short, NetBeans follows the instructions set down in RUNNING.txt. This is one of the reasons I like NetBeans over other development environments. How much easier it would be if the Tomcat distribution had the correct separation build in. IMHO, I think the way Tomcat currently does it is optimal. Keep it simple for those people who want to just unpack and go, while making it relatively easy for those people who want more flexibility. Vince For a development environment, I just typically unpack Tomcat somewhere, edit tomcat-users.xml, point NetBeans to it, and go. Typically, a development environment can contain all of the extra JARs required for development. This of course means a slightly slower Tomcat start up. If the start up times are onerous, then you can go ahead and use CATALINA_HOME and CATALINA_BASE in NetBeans quite easily. It's the same as setting things up in production, with the exception that NetBeans populates CATALINA_HOME and CATALINA_BASE based on the values you entered in the wizard (no environment variables to set). 1. Set up an unaltered Tomcat in one directory 2. Create a duplicate directory structure somewhere else - to whit: CATALINA_BASE-+ +-bin +-conf +-lib +-logs +-temp +-webapps +-work 3. Copy tomcat-juli.jar from CATALINA_HOME/bin to CATALINA_BASE/bin 4. Copy all of the stuff from CATALINA_HOME/conf to CATALINA_BASE/conf 5. Edit CATALINA_BASE/conf/server.xml a. change the Server port b. change HTTP/1.1 connector port c. change the HTTPS connector port or comment it out d. change the AJP connector port or comment it out 6. Edit tomcat-users.xml 7. Copy over the manager application a. Copy over the application from CATALINA_HOME/webapps - OR - b. Create a manager.xml in CATALINA_BASE/conf/Catalina/[hostname] ?xml version=1.0 encoding=UTF-8? Context docBase=location of manager application in CATALINA_HOME antiResourceLocking=false privileged=true useHttpOnly=true/ c. useHttpOnly=true is default for 7.0.x d. [hostname] is typically localhost for single Host server.xml To modify what extra JARs are needed for this CATALINA_BASE, just add them to CATALINA_BASE/lib. This way your pristine Tomcat remains pristine. This works for both NetBeans-controlled Tomcats and Tomcats not running under an IDE. Please note that the default mechanism used by Eclipse is quite different. . . . just my two cents. /mde/ -Original Message- From: Neven Cvetkovic [mailto:neven.cvetko...@gmail.com] Sent: 03 November 2014 20:22 To: Tomcat Users List Subject: Re: Separation of CATALINA_HOME and CATALINA_BASE Vince, On Mon, Nov 3, 2014 at 2:38 PM, vince.w...@thomsonreuters.com wrote: On the subject of Newbie-friendly, I think Tomcat would be a whole lot more friendly if CATALINA_HOME and CATALINA_BASE were always totally separate with a minimum of overlap. Why is that? I would argue current setup is very simple and newbie-friendly. Most newbies are going to have a single-instance tomcat running, even developers in their IDEs (Eclipse, NetBeans, IntelliJ, etc...) would probably start with a single Tomcat instance. You want your CATALINA_HOME = CATALINA_BASE in the newbie situation. Actually you don't even want to advertise the difference to the newbies. You probably shouldn't even configure CATALINA_HOME/CATALINA_BASE environment variables, but let the scripts infer from where you are running them. Now, once one graduates
Re: Separation of CATALINA_HOME and CATALINA_BASE
On Mon, Nov 3, 2014 at 3:33 PM, Christopher Schultz ch...@christopherschultz.net wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Vince, On 11/3/14 4:12 PM, vince.w...@thomsonreuters.com wrote: How much easier it would be if the Tomcat distribution had the correct separation build in. It would be harder for newbies and no real benefit to experts. Let me show you the difference in complexity between deploying Tomcat with a unified versus split configuration: Unified - --- $ wget http://host/path/to/tomcat-x.y.z.tar.gz $ tar xzf http://host/path/to/tomcat-x.y.z.tar.gz $ tomcat-x.y.z/bin/startup.sh You can do that in linux. not so well in windows. scripts work differently. you log out of the windows session, and the script stops, hence why every windows user wants to install Tomcat as a service, whichever way they do that. Separated - - $ wget http://host/path/to/tomcat-x.y.z.tar.gz $ tar xzf http://host/path/to/tomcat-x.y.z.tar.gz $ mkdir -p my-tomcat-base/conf $ mkdir -p my-tomcat-base/log $ mkdir -p my-tomcat-base/work $ mkdir -p my-tomcat-base/temp $ mkdir -p my-tomcat-base/webapps $ cp tomcat-x.y.z/conf/server.xml my-tomcat-base/conf $ cp tomcat-x.y.z/conf/web.xml my-tomcat-base/conf (the above step may not actually be necessary) $ cp tomcat-x.y.z/webapps/ROOT my-tomcat-base/webapps $ export CATALINA_HOME=`pwd`/tomcat-x.y.z $ export CATALINA_BASE=`pwd`/my-tomcat-base $ $CATALINA_HOME/bin/startup.sh Done. So, that's not all that complicated when you think about it, but to ask someone who knows nothing about a command-line, working effectively in an operating system, etc. and only knows about programming in Java -- maybe only servlet programming in Java -- to configure the server in the split case is confusing as all hell. Anyone downloading a ZIP or tar archive containing a Tomcat installation would be confused if the archive contained not one but two top-level directories. Also, it would overwrite your split-configuration if you unpacked that archive in the same directory as when you first started. An installer program would have to explain what in the world the split configuration was. Have you ever tried to tell someone how to set up their email? POP versus IMAP? Most users have absolutely no idea what that is, and mail programs give no clue as to which one to choose. The same would be true of CATALINA_HOME versus CATALINA_BASE. Everything has some degree of learning. New people are trying to learn two things at once, how something works as well as the why do it this way conventions that experienced users have implemented. New users don't understand the convention and want to learn it the hard way first before they can appreciate or even understand the convention. (Besides, I truly doubt that any expert system administrators are using the Tomcat Windows Installer to install/upgrade their systems. Maybe I'm wrong, You had qualify that with 'expert'... now I have nothing more to add. but then again I can't imagine running a Windows server in production. This too shall pass... I value my sleep and prefer to build new things instead of holding together configurations with chewing gum and duct tape. Oh, and rebooting all the time.) Anyhow, we can debate this all you want, but I will be -0 or even -1 to a default split-configuration of Tomcat unless someone has a really good idea for how to make it make sense to anyone on their first-touch. - -chris I would rather just point (windows) people to an example of a split configuration or any other configuration and let them implement it if they choose to do so, instead of getting Tomcat pre-configured. Part of the draw to Tomcat is that you have flexibility with how you choose to run it (script, service, windows installer, etc)
Re: Separation of CATALINA_HOME and CATALINA_BASE
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Chris, On 11/3/2014 1:33 PM, Christopher Schultz wrote: Vince, On 11/3/14 4:12 PM, vince.w...@thomsonreuters.com wrote: Even Tomcat newbies have to do real work that will find its way to a real server. Either of the benefits you described as a) and b) mean CATALINA_HOME and CATALINA_BASE need to be separate on a real server. I would rather get it straight from the outset rather than mess about with a configuration that is going nowhere. Separating a unified Tomcat deployment into CATALINA_HOME and CATALINA_BASE is pretty trivial. Your configuration isn't going nowhere. Do you know what's worse than a simple configuration to start that can grow into a complex one? One that is so complex you can't even get started. Have you ever configured Weblogic? There is (or was, back in circa 2001 when I had the misfortune of working on that platform) no such thing as unzip and run bin/startup.sh to launch the server. No, you basically had to go and get trained (at a high cost, by corporate trainers, of course) to do anything at all with the darned thing. Other application servers are equally unpleasant in my experience. If you want to talk about a configuration that is going nowhere, anything that is automatically done by Eclipse, NetBeans, etc. is not going anywhere. By default, NetBeans does absolutely nothing to change the Tomcat configuration. Even if you decide to use a separate CATALINA_HOME and CATALINA_BASE, NetBeans follows the model detailed in RUNNING.txt. NetBeans separates out CATALINA_HOME and CATALINA_BASE, either automatically making its own decisions about the content of CATALINA_BASE or manually by allowing you to specify your own hand crafted directory. I just made the switch from letting NetBeans populate CATALINA_BASE, to doing it myself. Naturally I want to avoid having the same files appear in both directories so I went for minimal content. How much easier it would be if the Tomcat distribution had the correct separation build in. It would be harder for newbies and no real benefit to experts. Let me show you the difference in complexity between deploying Tomcat with a unified versus split configuration: Unified --- $ wget http://host/path/to/tomcat-x.y.z.tar.gz $ tar xzf http://host/path/to/tomcat-x.y.z.tar.gz $ tomcat-x.y.z/bin/startup.sh Woot! Separated - $ wget http://host/path/to/tomcat-x.y.z.tar.gz $ tar xzf http://host/path/to/tomcat-x.y.z.tar.gz $ mkdir -p my-tomcat-base/conf $ mkdir -p my-tomcat-base/log $ mkdir -p my-tomcat-base/work $ mkdir -p my-tomcat-base/temp $ mkdir -p my-tomcat-base/webapps $ cp tomcat-x.y.z/conf/server.xml my-tomcat-base/conf $ cp tomcat-x.y.z/conf/web.xml my-tomcat-base/conf (the above step may not actually be necessary) $ cp tomcat-x.y.z/webapps/ROOT my-tomcat-base/webapps $ export CATALINA_HOME=`pwd`/tomcat-x.y.z $ export CATALINA_BASE=`pwd`/my-tomcat-base $ $CATALINA_HOME/bin/startup.sh Done. This is not so bad for a person used to the command line, but getting a developer on any platform to do this is going to be a challenge. If that developer is only familiar with Windows or the Macintosh at a user level, you've placed an almost insurmountable burden in getting Tomcat to run. So, that's not all that complicated when you think about it, but to ask someone who knows nothing about a command-line, working effectively in an operating system, etc. and only knows about programming in Java -- maybe only servlet programming in Java -- to configure the server in the split case is confusing as all hell. +1 Anyone downloading a ZIP or tar archive containing a Tomcat installation would be confused if the archive contained not one but two top-level directories. Also, it would overwrite your split-configuration if you unpacked that archive in the same directory as when you first started. An installer program would have to explain what in the world the split configuration was. Have you ever tried to tell someone how to set up their email? POP versus IMAP? Most users have absolutely no idea what that is, and mail programs give no clue as to which one to choose. The same would be true of CATALINA_HOME versus CATALINA_BASE. (Besides, I truly doubt that any expert system administrators are using the Tomcat Windows Installer to install/upgrade their systems. Maybe I'm wrong, but then again I can't imagine running a Windows server in production. I value my sleep and prefer to build new things instead of holding together configurations with chewing gum and duct tape. Oh, and rebooting all the time.) I (sadly) run a few Windows servers in production. I've not tried CATALINA_HOME / CATALINA_BASE in conjunction with the service install, since those systems are quite static. However, even updating Java on those systems is a bit of a pain. Rebooting is also not nice for reliability
Re: Separation of CATALINA_HOME and CATALINA_BASE
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Leo, On 11/3/14 5:05 PM, Leo Donahue wrote: On Mon, Nov 3, 2014 at 3:33 PM, Christopher Schultz ch...@christopherschultz.net wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Vince, On 11/3/14 4:12 PM, vince.w...@thomsonreuters.com wrote: How much easier it would be if the Tomcat distribution had the correct separation build in. It would be harder for newbies and no real benefit to experts. Let me show you the difference in complexity between deploying Tomcat with a unified versus split configuration: Unified - --- $ wget http://host/path/to/tomcat-x.y.z.tar.gz $ tar xzf http://host/path/to/tomcat-x.y.z.tar.gz $ tomcat-x.y.z/bin/startup.sh You can do that in linux. not so well in windows. scripts work differently. you log out of the windows session, and the script stops, hence why every windows user wants to install Tomcat as a service, whichever way they do that. Okay: C:\whatever wget http://host/path/to/tomcat-x.y.z.zip C:\whatever unzip http://host/path/to/tomcat-x.y.z.zip (or however you unzip from the CLI in Windows.. I haven't been able to figure that out, but it's clearer than giving mouse-click directions) C:\whatever SET CATALINA_HOME=C:\whatever\apache-tomcat-x.y.z C:\whatever SET CATALINA_BASE=C:\whatever\apache-tomcat-x.y.z C:\whatever %CATALINA_HOME%\bin\service.bat install my-great-webapp C:\whatever service start my-great-webapp Separated - - $ wget http://host/path/to/tomcat-x.y.z.tar.gz $ tar xzf http://host/path/to/tomcat-x.y.z.tar.gz $ mkdir -p my-tomcat-base/conf $ mkdir -p my-tomcat-base/log $ mkdir -p my-tomcat-base/work $ mkdir -p my-tomcat-base/temp $ mkdir -p my-tomcat-base/webapps $ cp tomcat-x.y.z/conf/server.xml my-tomcat-base/conf $ cp tomcat-x.y.z/conf/web.xml my-tomcat-base/conf (the above step may not actually be necessary) $ cp tomcat-x.y.z/webapps/ROOT my-tomcat-base/webapps $ export CATALINA_HOME=`pwd`/tomcat-x.y.z $ export CATALINA_BASE=`pwd`/my-tomcat-base $ $CATALINA_HOME/bin/startup.sh For Windowers: C:\whatever wget http://host/path/to/tomcat-x.y.z.zip C:\whatever unzip http://host/path/to/tomcat-x.y.z.zip (or however you unzip from the CLI in Windows.. I haven't been able to figure that out, but it's clearer than giving mouse-click directions) C:\whatever mkdir my-tomcat-base/conf C:\whatever mkdir my-tomcat-base/log C:\whatever mkdir my-tomcat-base/work C:\whatever mkdir my-tomcat-base/temp C:\whatever mkdir my-tomcat-base/webapps C:\whatever SET CATALINA_HOME=C:\whatever\apache-tomcat-x.y.z C:\whatever SET CATALINA_BASE=C:\whatever\my-tomcat-base C:\whatever %CATALINA_HOME%\bin\service.bat install my-great-webapp C:\whatever service start my-great-webapp (All this from memory... apologies if those exact commands don't work.) Done. So, that's not all that complicated when you think about it, but to ask someone who knows nothing about a command-line, working effectively in an operating system, etc. and only knows about programming in Java -- maybe only servlet programming in Java -- to configure the server in the split case is confusing as all hell. Anyone downloading a ZIP or tar archive containing a Tomcat installation would be confused if the archive contained not one but two top-level directories. Also, it would overwrite your split-configuration if you unpacked that archive in the same directory as when you first started. An installer program would have to explain what in the world the split configuration was. Have you ever tried to tell someone how to set up their email? POP versus IMAP? Most users have absolutely no idea what that is, and mail programs give no clue as to which one to choose. The same would be true of CATALINA_HOME versus CATALINA_BASE. Everything has some degree of learning. New people are trying to learn two things at once, how something works as well as the why do it this way conventions that experienced users have implemented. New users don't understand the convention and want to learn it the hard way first before they can appreciate or even understand the convention. Agreed. The point I'm trying to make is that experts are experts because they have learned. Peeling-back the covers of Tomcat reveals those expert features like a split configuration. Being forced to use a split-configuration because it's what experts do is one sure way to generate a lot of noise on this mailing list. (Besides, I truly doubt that any expert system administrators are using the Tomcat Windows Installer to install/upgrade their systems. Maybe I'm wrong, You had qualify that with 'expert'... now I have nothing more to add. but then again I can't imagine running a Windows server in production. This too shall pass... I value my sleep and prefer to build new things instead of holding together
Re: Separation of CATALINA_HOME and CATALINA_BASE
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Neven and Vince, It's dead-simple to run under NetBeans. Just unzip and go - use the defaults. On 11/3/2014 12:21 PM, Neven Cvetkovic wrote: Vince, On Mon, Nov 3, 2014 at 2:38 PM, vince.w...@thomsonreuters.com wrote: On the subject of Newbie-friendly, I think Tomcat would be a whole lot more friendly if CATALINA_HOME and CATALINA_BASE were always totally separate with a minimum of overlap. Why is that? I would argue current setup is very simple and newbie-friendly. Most newbies are going to have a single-instance tomcat running, even developers in their IDEs (Eclipse, NetBeans, IntelliJ, etc...) would probably start with a single Tomcat instance. You want your CATALINA_HOME = CATALINA_BASE in the newbie situation. Actually you don't even want to advertise the difference to the newbies. You probably shouldn't even configure CATALINA_HOME/CATALINA_BASE environment variables, but let the scripts infer from where you are running them. Now, once one graduates pass the newbie-friendly - one can start looking when CATALINA_HOME != CATALINA_BASE is useful. Here are some ideas, why you would maybe want to separate out CATALINA_HOME and CATALINA_BASE: a) when you want to make your Tomcat upgrades easier over time, so you just upgrade your CATALINA_HOME each time and you keep your existing CATALINA_BASE (instance configuration) directory. b) multi-instance environment, when you have multiple Tomcat instances running on the same machine, and you are sick-and-tired of copying entire tomcat directory for each instance and do the upgrades for each instance individually Other than that, I don't see another reason to have CATALINA_HOME and CATALINA_BASE be any different. Although I used Tomcat quite a lot years ago I still consider myself a Tomcat Newbie, mostly because configuration always took days or weeks longer than is reasonable. Now I'm back to Tomcat after years of having it easy using GlassFish. The files might be different now but the grief with configuration is still the same. I've been through numerous configurations with various versions of Tomcat 7 and 8 the furthest I've got is getting a database connection to work. Now having created a minimal CATALINA_BASE I've jumped a few steps back and it won't start. Exactly my point earlier Vince. You ignore setting up CATALINA_HOME/CATALINA_BASE, you let the scripts infer that from where it is being started. And then you just configure your datasource either at the GlobalNamingResources level (e.g at conf/server.xml) or at the Context level (e.g. at conf/Catalina/localhost/myapp.xml). I am sure many of the problems would evaporate if only there were built in and permanent clarity over the separation between CATALINA_HOME and CATALINA_BASE. Yes, I've read RUNNING.TXT and I'm left wondering why do I have a catalina class not found if all the tomcat jar files are in CATALINA_HOME/lib Using CATALINA_BASE: C:\tomcat8catalina_base Using CATALINA_HOME: C:\tomcat809 Using CATALINA_TMPDIR: C:\tomcat8catalina_base\temp Using JRE_HOME: C:\jdk1.7.0_55 Using CLASSPATH: C:\tomcat809\bin\bootstrap.jar;C:\tomcat8catalina_base\bin\tomcat-juli.jar Listening for transport dt_shmem at address: tomcat_shared_memory_id 03-Nov-2014 17:45:50.410 SEVERE [main] org.apache.tomcat.util.digester.Digester.startElement Begin event threw exception java.lang.ClassNotFoundException: org.apache.catalina.startup.VersionLoggerListener And the above is broken. You've checked the box marked Use Private Configuration Folder (Catalina Base) without setting that folder up properly. I'm surprised that NetBeans even allowed you to complete that configuration if it didn't find the requisite folder structure / JARs / configuration files in C:\tomcat8catalina_base. All these experiments are done running Tomcat under NetBeans so perhaps part of my issue is with NetBeans. The CLASSPATH shown above is a bit on the short side, is it meant to be so short ? Yes. There is no need to have a long CLASSPATH with Tomcat. If you are running Tomcat instance in IDE, why do you bother separating out CATALINA_BASE and CATALINA_HOME? Default unzip and play setup work nicely in Eclipse and IntelliJ. I have not played with NetBeans as much, but I am sure it is easy out-of-box setup. Hope that helps! Cheers! Neven I just did the following without any trouble under NetBeans 8.0.1. 1. Downloaded 8.0.14 (I know 8.0.15 is about out) Windows 64 bit zip 2. Unzipped it 3. Backed up tomcat-users.xml 4. Copied over my tomcat-users.xml from 7.0.56 5. Copied over my setenv.bat from 7.0.56 (sets up JMX, etc) 6. Configured the server in NetBeans a. used defaults b. added the user with manager-script role 7. Started it One of the issues I did run into when using tcnative-1.dll is that I got the following error message: 12.0.0.1 is not a recognized
Re: Separation of CATALINA_HOME and CATALINA_BASE
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Mark, On 11/3/14 5:16 PM, Mark Eggers wrote: Chris, On 11/3/2014 1:33 PM, Christopher Schultz wrote: Vince, On 11/3/14 4:12 PM, vince.w...@thomsonreuters.com wrote: Even Tomcat newbies have to do real work that will find its way to a real server. Either of the benefits you described as a) and b) mean CATALINA_HOME and CATALINA_BASE need to be separate on a real server. I would rather get it straight from the outset rather than mess about with a configuration that is going nowhere. Separating a unified Tomcat deployment into CATALINA_HOME and CATALINA_BASE is pretty trivial. Your configuration isn't going nowhere. Do you know what's worse than a simple configuration to start that can grow into a complex one? One that is so complex you can't even get started. Have you ever configured Weblogic? There is (or was, back in circa 2001 when I had the misfortune of working on that platform) no such thing as unzip and run bin/startup.sh to launch the server. No, you basically had to go and get trained (at a high cost, by corporate trainers, of course) to do anything at all with the darned thing. Other application servers are equally unpleasant in my experience. If you want to talk about a configuration that is going nowhere, anything that is automatically done by Eclipse, NetBeans, etc. is not going anywhere. By default, NetBeans does absolutely nothing to change the Tomcat configuration. Even if you decide to use a separate CATALINA_HOME and CATALINA_BASE, NetBeans follows the model detailed in RUNNING.txt. NetBeans separates out CATALINA_HOME and CATALINA_BASE, either automatically making its own decisions about the content of CATALINA_BASE or manually by allowing you to specify your own hand crafted directory. I just made the switch from letting NetBeans populate CATALINA_BASE, to doing it myself. Naturally I want to avoid having the same files appear in both directories so I went for minimal content. How much easier it would be if the Tomcat distribution had the correct separation build in. It would be harder for newbies and no real benefit to experts. Let me show you the difference in complexity between deploying Tomcat with a unified versus split configuration: Unified --- $ wget http://host/path/to/tomcat-x.y.z.tar.gz $ tar xzf http://host/path/to/tomcat-x.y.z.tar.gz $ tomcat-x.y.z/bin/startup.sh Woot! Separated - $ wget http://host/path/to/tomcat-x.y.z.tar.gz $ tar xzf http://host/path/to/tomcat-x.y.z.tar.gz $ mkdir -p my-tomcat-base/conf $ mkdir -p my-tomcat-base/log $ mkdir -p my-tomcat-base/work $ mkdir -p my-tomcat-base/temp $ mkdir -p my-tomcat-base/webapps $ cp tomcat-x.y.z/conf/server.xml my-tomcat-base/conf $ cp tomcat-x.y.z/conf/web.xml my-tomcat-base/conf (the above step may not actually be necessary) $ cp tomcat-x.y.z/webapps/ROOT my-tomcat-base/webapps $ export CATALINA_HOME=`pwd`/tomcat-x.y.z $ export CATALINA_BASE=`pwd`/my-tomcat-base $ $CATALINA_HOME/bin/startup.sh Done. This is not so bad for a person used to the command line, but getting a developer on any platform to do this is going to be a challenge. I presented those examples in CLI terms because they are brief, concise, and correct. The Nullsoft Installer basically does that same stuff but with safety gear surrounding it. If that developer is only familiar with Windows or the Macintosh at a user level, you've placed an almost insurmountable burden in getting Tomcat to run. While a Mac installer might be nice, it's really not hard to unzip and then bin/startup.sh on Mac. I'd argue that about Windows, but I recently did some consulting with a company full of Windows administrators and when I dropped to the command-line to get some real work done (my words to them), they all got a panicked expression on their faces. I guess without a point-and-click interface, some folks are just lost. So, that's not all that complicated when you think about it, but to ask someone who knows nothing about a command-line, working effectively in an operating system, etc. and only knows about programming in Java -- maybe only servlet programming in Java -- to configure the server in the split case is confusing as all hell. +1 Anyone downloading a ZIP or tar archive containing a Tomcat installation would be confused if the archive contained not one but two top-level directories. Also, it would overwrite your split-configuration if you unpacked that archive in the same directory as when you first started. An installer program would have to explain what in the world the split configuration was. Have you ever tried to tell someone how to set up their email? POP versus IMAP? Most users have absolutely no idea what that is, and mail programs give no clue as to which one to choose. The same would be true of CATALINA_HOME versus
Re: Separation of CATALINA_HOME and CATALINA_BASE
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Mark, On 11/3/14 4:59 PM, Mark Eggers wrote: 1. Set up an unaltered Tomcat in one directory 2. Create a duplicate directory structure somewhere else - to whit: CATALINA_BASE-+ +-bin +-conf +-lib +-logs +-temp +-webapps +-work You don't need all of that, but you can create all that structure if you'd like. 3. Copy tomcat-juli.jar from CATALINA_HOME/bin to CATALINA_BASE/bin tomcat-juli.jar can still live in CATALINA_HOME/bin (unless is something very specific to Netbeans deployments). 4. Copy all of the stuff from CATALINA_HOME/conf to CATALINA_BASE/conf You don't need it all. Really, only server.xml is required. 5. Edit CATALINA_BASE/conf/server.xml a. change the Server port b. change HTTP/1.1 connector port c. change the HTTPS connector port or comment it out d. change the AJP connector port or comment it out 6. Edit tomcat-users.xml 7. Copy over the manager application a. Copy over the application from CATALINA_HOME/webapps - OR - b. Create a manager.xml in CATALINA_BASE/conf/Catalina/[hostname] ?xml version=1.0 encoding=UTF-8? Context docBase=location of manager application in CATALINA_HOME antiResourceLocking=false privileged=true useHttpOnly=true/ I've started doing this: Context docBase=${catalina.home}/webapps/manager ... Since I never deploy from CATALINA_HOME, I can always rely on the manager sitting there in the webapps/ directory. Actually, in order to avoid synchronization issues between package-managed manager.xml and whatever ships with Tomcat, we just wrote an XSL transform that adds a docBase to the stock CATALINA_HOME/webapps/manager/WEB-INF/context.xml. So we keep up-to-date with anything that gets changed in there from release to release. To modify what extra JARs are needed for this CATALINA_BASE, just add them to CATALINA_BASE/lib. This way your pristine Tomcat remains pristine. This is the one thing I haven't bothered to do yet for our deployments. We need a JDBC driver and I usually just drop it into CATALINA_HOME/lib and call it a day. Many times I've been bitten by that when I install a new version of Tomcat and try to launch the webapp, realizing that the JDBC driver wasn't in place. We don't package-manage the driver and we don't use Maven or anything like that to go auto-download dependencies or anything crazy like that, so it's not currently a part of the application build process at all. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1 Comment: GPGTools - http://gpgtools.org iQIcBAEBCAAGBQJUWApXAAoJEBzwKT+lPKRYEXcP/jCCRuwIxpgt9XcfYrclr8BZ xGzkqvh8am/Tp/xo980ZuDiLOBLYJdVl0vXmgm0HWHlidpFbqkGJZG8uIDgXDBQ4 qSQGu9InvdwNTgn0sx/tlED9tfS2XDIJno6GUYMetjfaqwmGQEDtsKKdy5ycbigz xMC91NJEqSgLbcCRp3WOTXGIJPJB14GQtPHGbMU7iOpLXcbxAgE3Ld3Sl2DYzl+H oafNVVaTglV8ENQbrtKN55bJzco38tEcgJ6IhNbTPZ6XsV/sdwSAzBvrvhmHzPja uCmnnp/AN9qa+rJUiY+DL9obJef1VxU4PKZ6MtW9PawGlClbQaVGedr/6T7NthjH ZbJoGVr85KM0cFTYIuys0a4k3u8If1eMoFWXo5jGssAzTfOA10jRyAjByelJbbbT R+KcZ4PuVOslhXK1J80Di47SEJvMFwdafFUBBRNOBKhv18hB9eeaETacJjB5ChGj uLk7rdOktoDKmErrvDv5BIw+AhVCTeCP6gwphUZ2sFl6sMan5l8crDOCcfmn+Yod zhvCOVvhEXaOYW9kXvr3pu3wlxKUzIborxtFnmVlvQMXMeBfJ6XqfK/vmBqrZK2V 8zHnn+eYZ4T/ClTKNxYdfu4Q5pHe1EDTxHP50bTET7zHHqtc25XCZfTHrmQwJJB9 bcEbkdyqN7hzqrRftt33 =vA7W -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Separation of CATALINA_HOME and CATALINA_BASE
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Mark, On 11/3/14 5:46 PM, Mark Eggers wrote: One of the issues I did run into when using tcnative-1.dll is that I got the following error message: 12.0.0.1 is not a recognized command, and Tomcat failed to start. Moving tcnative-1.dll out of the bin directory fixed the problem. When I specified JRE_HOME in setenv.bat, that also fixed the problem and allowed me to use tcnative-1.dll. I suspect some brokenness in the way NetBeans is handling the JRE_HOME environment variable, since I do have that set system-wide. That's weird. It looks like someone a) mistyped 127.0.0.1 for localhost and b) a script isn't working properly. Is this Netbeans-only, or does it happen with a stock Tomcat? It's also odd that it has something to do with using tcnative at the same time. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1 Comment: GPGTools - http://gpgtools.org iQIcBAEBCAAGBQJUWAr3AAoJEBzwKT+lPKRYou0P/1hnUCigz86EW8OsbNM68VG+ WXpaQOR389GL6t9WUjfaYg9wvkV4r7IbVwPIBGs9NNYtQjBP/TOrwq392smcuHL8 lsFVy1t4dOsjMeVv68wEBXylmoNY/4hnkuGK2Z9Qt28lBMgnEcvGRWaFcgMDNHiZ JsoXqTWmj8TfthZ02b+tklbIxIJizDTjPJcgnIxjGBHkjxCSplTODXNPkusmgc+x ddwGIGHyxYTT89z6OwONhKrlGON7m2NEmqHu9ggbBp4k6QCjBM917GSPHLqYumAt Z601xOZmJC/RX8sQbkQHSYTAX/oIQvR4ypH4J5pfZ3DidZtyIwmpSPVgy0vXTs3D B+iialoheRcE8Nldb4apGk4W3pZ1L5agz19Ru037soUxXWqwxEJtp38w5VzX4TcQ P8Qfd69l90N0ecA02qX+IJ3wnZmFtxLUb/c/XboABj0nWt8tOD8dQ+rEoKALUYMT aUKXATM+PwuT4z/QcYgcUFcdusHbwlVmftQSD4Atgo87hc4/+yDG4ryswhCodW2O R89KaQeDr4a8BQP4NmzD4XWgiH4ymSrBpXipaSxeoKq3eCI6ZubSNm8M9X1CF0E3 eqKNoBCmf9qtAA7m0Ku8dExJhtFfQtZCTiy0By+b5W2aV2BGU26ze3W2KNbh6ki/ q9NXGe01Z36YQMMavTYu =Zo4E -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Separation of CATALINA_HOME and CATALINA_BASE
Chris, Leo, Vince, On Mon, Nov 3, 2014 at 5:42 PM, Christopher Schultz ch...@christopherschultz.net wrote: So, that's not all that complicated when you think about it, but to ask someone who knows nothing about a command-line, working effectively in an operating system, etc. and only knows about programming in Java -- maybe only servlet programming in Java -- to configure the server in the split case is confusing as all hell. +1 Anyone downloading a ZIP or tar archive containing a Tomcat installation would be confused if the archive contained not one but two top-level directories. Also, it would overwrite your split-configuration if you unpacked that archive in the same directory as when you first started. +1 An installer program would have to explain what in the world the split configuration was. Have you ever tried to tell someone how to set up their email? POP versus IMAP? Most users have absolutely no idea what that is, and mail programs give no clue as to which one to choose. The same would be true of CATALINA_HOME versus CATALINA_BASE. Everything has some degree of learning. New people are trying to learn two things at once, how something works as well as the why do it this way conventions that experienced users have implemented. New users don't understand the convention and want to learn it the hard way first before they can appreciate or even understand the convention. Agreed. The point I'm trying to make is that experts are experts because they have learned. Peeling-back the covers of Tomcat reveals those expert features like a split configuration. Being forced to use a split-configuration because it's what experts do is one sure way to generate a lot of noise on this mailing list. +1 I value my sleep and prefer to build new things instead of holding together configurations with chewing gum and duct tape. Oh, and rebooting all the time.) Anyhow, we can debate this all you want, but I will be -0 or even -1 to a default split-configuration of Tomcat unless someone has a really good idea for how to make it make sense to anyone on their first-touch. - -chris I would rather just point (windows) people to an example of a split configuration or any other configuration and let them implement it if they choose to do so, instead of getting Tomcat pre-configured. Part of the draw to Tomcat is that you have flexibility with how you choose to run it (script, service, windows installer, etc) +1 +1 Vince, the current configuration works great: 1) If you are a newbie administrator you are going to use easy-to-use-newbie-friendly configuration. It will get you started, it will get your application working, etc... Great starting point. 2) If you are developer (newbie or expert) and using IDE (Eclipse, Netbeans, IntelliJ) - you are going to use out-of-box tomcat configuration. Single Tomcat instance, no-split configuration. 3) If you are administrator that is upgrading Tomcat, you will just create a process to configure your instance with new Tomcat binaries and copy over the configuration file (most of the stuff is backwards compatible in server.xml within the point-version) + add any shared libraries to new tomcat/lib folder (JDBC drivers, etc...). Again, single-tomcat instance, no-split configuration necessary. Although, may people do like to split for easier upgrades and separation of concerns. 4) If you are administrator that is managing multi-instance environment, you can still get away with copying standard out-of-box Tomcat directory over and over again, for each instance separately. The hassle would be to do the upgrades on many instances. That's why we have CATALINA_HOME for shared stuff (binaries+libraries) and CATALINA_BASE for instance-specific configuration. And in this case you would know about the split directory setup option and would research how to do that effectively. My question is - why do you use CATALINA_BASE if you are using IDE (Netbeans)? If you are developer, there is no need to use split configuration. SLIGHTLY-OFFTOPIC: Although, I would love to see out-of-box setup for additional shared-lib folder, something other than TOMCAT/lib with Tomcat default libraries. Essentially, I would love to separate my customer shared libraries from Tomcat default libraries. I guess - question would be where are CATALINA_HOME/lib JAR files being loaded from? Can we add another directory to scan for libraries to be loaded? Is that configurable? Cheers! Neven
Re: Separation of CATALINA_HOME and CATALINA_BASE
Reply-to-my question: On Mon, Nov 3, 2014 at 6:42 PM, Neven Cvetkovic neven.cvetko...@gmail.com wrote: SLIGHTLY-OFFTOPIC: Although, I would love to see out-of-box setup for additional shared-lib folder, something other than TOMCAT/lib with Tomcat default libraries. Essentially, I would love to separate my customer shared libraries from Tomcat default libraries. I guess - question would be where are CATALINA_HOME/lib JAR files being loaded from? Can we add another directory to scan for libraries to be loaded? Is that configurable? I guess, it's easy to add new directories to TOMCAT/conf/catalina.properties file: common.loader= ${catalina.base}/lib,${catalina.base}/lib/*.jar,${catalina.home}/lib,${catalina.home}/lib/*.jar to now read: common.loader= ${catalina.base}/lib,${catalina.base}/lib/*.jar,${catalina.home}/lib,${catalina.home}/lib/*.jar,${catalina.base}/shared,${catalina.base}/shared/*.jar,${catalina.home}/shared,${catalina.home}/shared/*.jar What are you thoughts? Would it make sense to keep a separate directory for shared libraries? Should we make it default - to encourage others to create a directory if they want to. Default behaviour for org.apache.catalina.startup.ClassLoaderFactory is to validate if the file exists/isDirectory/isReadable? That might confuse beginners with a Warning ... I guess Tomcat philosophy is to keep it simple, and extensible - so experts that need to customize things they can, and it is simple and not confusing for beginners. What are your thoughts? Cheers! Neven
RE: Separation of CATALINA_HOME and CATALINA_BASE
I don’t see their separation as being incompatible with running from a default shell or batch file. It already figures out where to use for CATALINA_HOME, the default place for CATALINA_BASE could be a standard difference from CATALINA_HOME, for example: CATALINA_BASE=$CATALINA_HOME/../catalina_base I imagine this could work OK directly from an extracted tar distribution as it does now. I don't know how much difficulty this would cause for IDE plugin's, they might end up needing less code rather than more. Vince -Original Message- From: Mark Eggers [mailto:its_toas...@yahoo.com.INVALID] Sent: 16 October 2014 20:07 To: Tomcat Users List Subject: Re: Separation of CATALINA_HOME and CATALINA_BASE -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Konstantin, On 10/16/2014 11:52 AM, Konstantin Kolinko wrote: 2014-10-16 22:11 GMT+04:00 vince.w...@thomsonreuters.com: Hello I'm coming back to Tomcat after years using GlassFish. The little that I ever understood of Tomcat 3, 4 and 5 is now decidedly rusty so I've been reading Tomcat 7's RUNNING.txt with interest. The section under the heading: Advanced Configuration - Multiple Tomcat Instances Looks interesting to me even though I have no desire to run multiple instances. Configuring CATALINA_HOME and CATALINA_BASE to be separate directories looks to me like such a winning idea that I'm left wondering, why the default TOMCAT installation puts all that stuff in one directory ? I have not looked to see if Tomcat 8 separates them. 1) The default distributive is friendly to newbies. If you just run startup.sh (startup.bat) it assumes that CATALINA_HOME == CATALINA_BASE == its parent directory and starts successfully. If you separate home and base you have to pass them as environment variables to the scripts. That requires a bit more of configuration from the users. 2) On productive systems you usually configure CATALINA_BASE once (your site) and install a new CATALINA_HOME with each point release. Even if some files such as webapps are not used in the home directory in this configuration, it may be useful to have them for reference. http://tomcat.apache.org/migration.html#Before_upgrading_or_migrating http://tomcat.apache.org/migration-8.html#Upgrading_8.0.x 3) Many 3rd parties (Linux vendors) redistribute Tomcat with separate home and base directories. Best regards, Konstantin Kolinko I think that the combined approach is useful in a number of scenarios. 1. Newbie-friendly Just unzip (untar, install) and go. With the installer I suppose you could have it query where CATALINA_BASE and CATALINA_HOME are to be placed, so the environment variables are constructed and placed in setenv.(bat/sh). If you use the archive rather than the installer, it's up to the user to figure this out. 2. IDE-friendly NetBeans works well with the combined approach. It even uses the standard manager-script role for deployment. Eclipse is not quite as nice, but again using the combined version makes integrating Tomcat with Eclipse as painless as it can be. IntelliJ seems to fit in between NetBeans and Eclipse in terms of Tomcat integration friendliness, and I don't know how it would be impacted by a default separation. Most developers are not very comfortable with administrative tasks (as most administrators are not very comfortable with developer tasks), so placing an additional barrier for developers would not be welcomed by many. 3. Differing install scenarios Finally, I can see a scenario somewhat like the following: a. explode a standard Tomcat distribution b. add a single web application - one per Tomcat c. package the result back up d. write a Chef cookbook for deploying this to 100s of machines For a large environment with clustered applications, this may be the way to go. It's facilitated (somewhat) by the combined approach. . . . just some ramblings /mde/ -BEGIN PGP SIGNATURE- Version: GnuPG v2 iQEcBAEBAgAGBQJUQBdSAAoJEEFGbsYNeTwtqLAIAJvDJxiS1eOHtV1XF1Dfezr1 u+Kom0QeROZ8XEKfcgYvS6Ig72UOFEsREdMvbUv6YfAGP9zZPagb4hvNfAsE4M3Q 9zzpgZovNXl94ZEDi9shcJqJg+oxFVvrzNHPDMryLIou1YmNJdOSbszeC4zgIge2 grYP4xqlMO8VqUTT1eNVbrtoDyEdjGxAJB9BkR+lYPw+tSqFq9u8C2EtRD2lBn7f EA97uE5qYLtoj69sI6ThRc26ox2ZtSiWv0ghwanJP8FhtnT7lLd47A+2GndFbxhx gSRa0z/AHM9x0qI71VyoJfKL41vZGaDZmuPDLU//BF429LfeYzEBOfVSIAmG9R0= =/suK -END PGP SIGNATURE-
Separation of CATALINA_HOME and CATALINA_BASE
Hello I'm coming back to Tomcat after years using GlassFish. The little that I ever understood of Tomcat 3, 4 and 5 is now decidedly rusty so I've been reading Tomcat 7's RUNNING.txt with interest. The section under the heading: Advanced Configuration - Multiple Tomcat Instances Looks interesting to me even though I have no desire to run multiple instances. Configuring CATALINA_HOME and CATALINA_BASE to be separate directories looks to me like such a winning idea that I'm left wondering, why the default TOMCAT installation puts all that stuff in one directory ? I have not looked to see if Tomcat 8 separates them. I welcome your thoughts. Vince This e-mail is for the sole use of the intended recipient and contains information that may be privileged and/or confidential. If you are not an intended recipient, please notify the sender by return e-mail and delete this e-mail and any attachments. Certain required legal entity disclosures can be accessed on our website.http://thomsonreuters.com/prof_disclosures/
Re: Separation of CATALINA_HOME and CATALINA_BASE
On 16/10/2014 19:11, vince.w...@thomsonreuters.com wrote: Hello I'm coming back to Tomcat after years using GlassFish. The little that I ever understood of Tomcat 3, 4 and 5 is now decidedly rusty so I've been reading Tomcat 7's RUNNING.txt with interest. The section under the heading: Advanced Configuration - Multiple Tomcat Instances Looks interesting to me even though I have no desire to run multiple instances. Configuring CATALINA_HOME and CATALINA_BASE to be separate directories looks to me like such a winning idea that I'm left wondering, why the default TOMCAT installation puts all that stuff in one directory ? I'm not sure that is any reason other than it has always been that way. It is something to consider for 9.0.x (work starting on that soon). An interesting question here is how smart should we / could we make the Windows installer? I have not looked to see if Tomcat 8 separates them. It doesn't. Mark I welcome your thoughts. Vince This e-mail is for the sole use of the intended recipient and contains information that may be privileged and/or confidential. If you are not an intended recipient, please notify the sender by return e-mail and delete this e-mail and any attachments. Certain required legal entity disclosures can be accessed on our website.http://thomsonreuters.com/prof_disclosures/ - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Separation of CATALINA_HOME and CATALINA_BASE
2014-10-16 22:11 GMT+04:00 vince.w...@thomsonreuters.com: Hello I'm coming back to Tomcat after years using GlassFish. The little that I ever understood of Tomcat 3, 4 and 5 is now decidedly rusty so I've been reading Tomcat 7's RUNNING.txt with interest. The section under the heading: Advanced Configuration - Multiple Tomcat Instances Looks interesting to me even though I have no desire to run multiple instances. Configuring CATALINA_HOME and CATALINA_BASE to be separate directories looks to me like such a winning idea that I'm left wondering, why the default TOMCAT installation puts all that stuff in one directory ? I have not looked to see if Tomcat 8 separates them. 1) The default distributive is friendly to newbies. If you just run startup.sh (startup.bat) it assumes that CATALINA_HOME == CATALINA_BASE == its parent directory and starts successfully. If you separate home and base you have to pass them as environment variables to the scripts. That requires a bit more of configuration from the users. 2) On productive systems you usually configure CATALINA_BASE once (your site) and install a new CATALINA_HOME with each point release. Even if some files such as webapps are not used in the home directory in this configuration, it may be useful to have them for reference. http://tomcat.apache.org/migration.html#Before_upgrading_or_migrating http://tomcat.apache.org/migration-8.html#Upgrading_8.0.x 3) Many 3rd parties (Linux vendors) redistribute Tomcat with separate home and base directories. Best regards, Konstantin Kolinko - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Separation of CATALINA_HOME and CATALINA_BASE
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Konstantin, On 10/16/2014 11:52 AM, Konstantin Kolinko wrote: 2014-10-16 22:11 GMT+04:00 vince.w...@thomsonreuters.com: Hello I'm coming back to Tomcat after years using GlassFish. The little that I ever understood of Tomcat 3, 4 and 5 is now decidedly rusty so I've been reading Tomcat 7's RUNNING.txt with interest. The section under the heading: Advanced Configuration - Multiple Tomcat Instances Looks interesting to me even though I have no desire to run multiple instances. Configuring CATALINA_HOME and CATALINA_BASE to be separate directories looks to me like such a winning idea that I'm left wondering, why the default TOMCAT installation puts all that stuff in one directory ? I have not looked to see if Tomcat 8 separates them. 1) The default distributive is friendly to newbies. If you just run startup.sh (startup.bat) it assumes that CATALINA_HOME == CATALINA_BASE == its parent directory and starts successfully. If you separate home and base you have to pass them as environment variables to the scripts. That requires a bit more of configuration from the users. 2) On productive systems you usually configure CATALINA_BASE once (your site) and install a new CATALINA_HOME with each point release. Even if some files such as webapps are not used in the home directory in this configuration, it may be useful to have them for reference. http://tomcat.apache.org/migration.html#Before_upgrading_or_migrating http://tomcat.apache.org/migration-8.html#Upgrading_8.0.x 3) Many 3rd parties (Linux vendors) redistribute Tomcat with separate home and base directories. Best regards, Konstantin Kolinko I think that the combined approach is useful in a number of scenarios. 1. Newbie-friendly Just unzip (untar, install) and go. With the installer I suppose you could have it query where CATALINA_BASE and CATALINA_HOME are to be placed, so the environment variables are constructed and placed in setenv.(bat/sh). If you use the archive rather than the installer, it's up to the user to figure this out. 2. IDE-friendly NetBeans works well with the combined approach. It even uses the standard manager-script role for deployment. Eclipse is not quite as nice, but again using the combined version makes integrating Tomcat with Eclipse as painless as it can be. IntelliJ seems to fit in between NetBeans and Eclipse in terms of Tomcat integration friendliness, and I don't know how it would be impacted by a default separation. Most developers are not very comfortable with administrative tasks (as most administrators are not very comfortable with developer tasks), so placing an additional barrier for developers would not be welcomed by many. 3. Differing install scenarios Finally, I can see a scenario somewhat like the following: a. explode a standard Tomcat distribution b. add a single web application - one per Tomcat c. package the result back up d. write a Chef cookbook for deploying this to 100s of machines For a large environment with clustered applications, this may be the way to go. It's facilitated (somewhat) by the combined approach. . . . just some ramblings /mde/ -BEGIN PGP SIGNATURE- Version: GnuPG v2 iQEcBAEBAgAGBQJUQBdSAAoJEEFGbsYNeTwtqLAIAJvDJxiS1eOHtV1XF1Dfezr1 u+Kom0QeROZ8XEKfcgYvS6Ig72UOFEsREdMvbUv6YfAGP9zZPagb4hvNfAsE4M3Q 9zzpgZovNXl94ZEDi9shcJqJg+oxFVvrzNHPDMryLIou1YmNJdOSbszeC4zgIge2 grYP4xqlMO8VqUTT1eNVbrtoDyEdjGxAJB9BkR+lYPw+tSqFq9u8C2EtRD2lBn7f EA97uE5qYLtoj69sI6ThRc26ox2ZtSiWv0ghwanJP8FhtnT7lLd47A+2GndFbxhx gSRa0z/AHM9x0qI71VyoJfKL41vZGaDZmuPDLU//BF429LfeYzEBOfVSIAmG9R0= =/suK -END PGP SIGNATURE- --- This email is free from viruses and malware because avast! Antivirus protection is active. http://www.avast.com - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Separation of CATALINA_HOME and CATALINA_BASE
Mark Thank you for such a quick response. Personally I don't have much interest in Tomcat's Windows installer. I am more interested in the directory structure that you get from expanding apache-tomcat-nnn.tar.gz Vince -Original Message- From: Mark Thomas [mailto:ma...@apache.org] Sent: 16 October 2014 19:44 To: Tomcat Users List Subject: Re: Separation of CATALINA_HOME and CATALINA_BASE On 16/10/2014 19:11, vince.w...@thomsonreuters.com wrote: Hello I'm coming back to Tomcat after years using GlassFish. The little that I ever understood of Tomcat 3, 4 and 5 is now decidedly rusty so I've been reading Tomcat 7's RUNNING.txt with interest. The section under the heading: Advanced Configuration - Multiple Tomcat Instances Looks interesting to me even though I have no desire to run multiple instances. Configuring CATALINA_HOME and CATALINA_BASE to be separate directories looks to me like such a winning idea that I'm left wondering, why the default TOMCAT installation puts all that stuff in one directory ? I'm not sure that is any reason other than it has always been that way. It is something to consider for 9.0.x (work starting on that soon). An interesting question here is how smart should we / could we make the Windows installer? I have not looked to see if Tomcat 8 separates them. It doesn't. Mark I welcome your thoughts. Vince This e-mail is for the sole use of the intended recipient and contains information that may be privileged and/or confidential. If you are not an intended recipient, please notify the sender by return e-mail and delete this e-mail and any attachments. Certain required legal entity disclosures can be accessed on our website.http://thomsonreuters.com/prof_disclosures/ - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Separation of CATALINA_HOME and CATALINA_BASE
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Mark, On 10/16/14 2:43 PM, Mark Thomas wrote: On 16/10/2014 19:11, vince.w...@thomsonreuters.com wrote: Hello I'm coming back to Tomcat after years using GlassFish. The little that I ever understood of Tomcat 3, 4 and 5 is now decidedly rusty so I've been reading Tomcat 7's RUNNING.txt with interest. The section under the heading: Advanced Configuration - Multiple Tomcat Instances Looks interesting to me even though I have no desire to run multiple instances. Configuring CATALINA_HOME and CATALINA_BASE to be separate directories looks to me like such a winning idea that I'm left wondering, why the default TOMCAT installation puts all that stuff in one directory ? I'm not sure that is any reason other than it has always been that way. It is a bit easier to configure when CATALINA_BASE = CATALINA_HOME, especially for automated installers as well as the ZIP installer (aka just unzip into apache-tomcat-x.y.z directory). It is something to consider for 9.0.x (work starting on that soon). An interesting question here is how smart should we / could we make the Windows installer? If we added CATALINA_BASE ≠ CATALINA_HOME as default, the automated installer would have to ask where to install Tomcat and also where to install Tomcat's first deployment, which would be a bit confusing to people. The ZIP installer would need to have apache-tomcat-x.y.z plus something like apache-tomcat-deploy inside of it with Tomcat defaulting to use that as CATALINA_BASE. I don't see it working for novice users, and I don't see it working for advanced users, either, because they already know what they are doing. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1 Comment: GPGTools - http://gpgtools.org iQIcBAEBCAAGBQJUQDJvAAoJEBzwKT+lPKRYsY4P/36Dcuq0+2L1nL7LdGJus6+p 5VkJvzmlwFY3pfRNR4MHsXjEu8iBJV/QwDoplivZHd3KhcjoxGC8R6HKYeVHGub/ kSN1xeRqyPF1pqUJw7ejGKQaHP17UI4YeygxYCb4AKkh+L02Tkdsn+/JFGG5URmA NWlXFygxIE52HyXXfdEoV2KRY6M7frB2AFIVXOD/TpW36EO+O3QecCHQDTRZRDv1 1o5TQI++DzQeL/eBVYGg7bu/bC8jPAWC5cDBoQXE/H+iqBHbr9+C8tsSGEiYxZS+ mzC/UKhnfnNAp8PqzyLN/qLncwITE2A3QWxkDqFrk1sLlcKO2b2iXCkG+BiOewVw Iv1x8PJihvE9Tz7YZyv1MC6tVUZq5lBBviOfW+M2iHGPM5gy6j2gYMq1cxlTi1rD B2rs/0Ues0PPG7PjwDnSazZQtRrbiKYFIpLca8abgGQ8AUPlFqDtl7EN2azt+xjf Tc07l1W+86JZIkXUvcKbACkHcsHQg2bCcJtnIVaNfkwUnkVIHll/OyffgE53tL7W xzoBMGzxPNyp96mrvEbXhq+nyHRL+BCkEJDcbK2XSGKZWGTgWOxD4RUm9KUW3pNc orH8p7YQ7bj2PwQV3qZktDQ1dJw0IPLdbkhX3Nbr5Lp/80eCZXa9BFnrRjgQsgd6 Xv94kVsiBJvoh84wzViV =XhYF -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: $CATALINA_HOME/conf/context.xml .. restrict a context?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Ravi, On 3/3/14, 5:53 PM, Ravi Gupta wrote: Any idea if the same would work for JBOSS 5.X (uses tomcat under the hood)? perhaps it is not the same, but I tried putting admin-console.xml under jboss-5.1.0.GA/server/default/deploy/jbossweb.sar it contains Context path=/admin-console Valve className=org.apache.catalina.valves.RemoteAddrValve deny=* / /Context But I was still able to access http://localhost:8080/admin-console after a bounce? Any suggestions would be apreciated Take a look at the documentation for RemoteAddrValve, particularly the deny attribute. You have configured this incorrectly. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1 Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBCAAGBQJTFhy0AAoJEBzwKT+lPKRYAvYP/jfH/uFLLSthgf6O+rGh6/Dy nCYOOmsxG2O8Pc7g26mm75Zz7n1zctq7Bsbz/UNM0nwBbAI3kVwCAJIlQqHb5CxY qdaZu/B2YqB6xzMAYbdtrQ8io0i3uVPBqKM2K8pvccFhxdWlvfQtbTWIDtlbofaP Y9cRKWqQFge6BQKQDjeHFgA01htZcwD6+Tm6ckjjQfDGxFXoWIbKEWNxwROhu0zn 6gD97iO9DNAmDbTfrMDX4QfT9jvu2RgtZ+MilUHHEXpKAnVagMmznvbG0pt3CzoL 1g6oGLZJMtiJkNMDQEfU9gtxR/avYBiNCc+UcNz7n+Lb08CzeWrNT5rn/baPV+84 HHXNvw/qCihy0VSKVwnBQ/iewTKysRW5rmO4b8tGR1vvx46kignONMnP74ySL/xC wjTFIOMcoHTdrLVj3QwifxZqHtxsYF2MGbXjhLfFaqsgKiCneP5oT9BfvoDPUCel AX4+J/8V3bFZhpdG/5yzQgMkzQOfqCYbkpdfoJIn3PPXJoyAamCe2PeIQ9bgKrnb SDUgQQoEIuIqYqxLTF+cfT25FDrRrJmwc/z9z8+FLnPp+ld7t5jNdN38L4CW98TO vuIdXRPT0fEq2WW/XQLG1xDtO4RUJfZUVHCy4N2EGxrC+jiLVH5YKRDD6it+4sOW T6Bhqe9hES30N5SQ1HSo =v1We -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
$CATALINA_HOME/conf/context.xml .. restrict a context?
Tomcat 6.X RHEL I tried adding the below in order to limit access to /admin-console It worked, but it limits access to EVERY context, which is odd. I am sure I am doing something wrong or I misunderstand how this works I want to put restrictions on the /admin-console context, but I do not want it inside the admin-console.war Again, this works, but other contexts are denied as well! Context path=/admin-console Valve className=org.apache.catalina.valves.RemoteAddrValve deny=* / /Context
Re: $CATALINA_HOME/conf/context.xml .. restrict a context?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Ravi, On 3/3/14, 5:10 PM, Ravi Gupta wrote: Tomcat 6.X RHEL I tried adding the below in order to limit access to /admin-console It worked, but it limits access to EVERY context, which is odd. I am sure I am doing something wrong or I misunderstand how this works I want to put restrictions on the /admin-console context, but I do not want it inside the admin-console.war Again, this works, but other contexts are denied as well! Context path=/admin-console Valve className=org.apache.catalina.valves.RemoteAddrValve deny=* / /Context I'm guessing the file you edited was CATALINA_BASE/conf/context.xml? That's not the right file to edit. Undo all the changes you made to conf/context.xml. Instead, you want to edit the META-INF/context.xml file in your own webapp (or CATALINA_BASE/conf/[engine]/[host]/admin-console.xml if you have manually-deployed your application using an XML descriptor). - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1 Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBCAAGBQJTFQCoAAoJEBzwKT+lPKRYGXQQAKgWOzPpKvC9YvuSJWdDY5Ud 325eSaK73rns77SWz2nUFt3je5GTEFmQAuCyBHueeaGgaFsY9GrkE9/YtsuWxB52 gO22zYywmTtfSY4MNt5z4dolbWfkktcFkLA96FQxa4ZI7ZdvmyL4XRRPJSSKRck3 qushWLC5IhbTknnbbOFm3OAv/xY60dzorB8ashIDjMO1Rm+6xOWf2x3PeTAeuy8K h5rKVi1u2KkMnbMtvJABX2WGdYZA+r/LNozotXHDGApvEVFu4+YtRWpZx2kgeVVG 0pbgLlfmT3cltDGkfOLq7xk11/VJNVR/A276naolfA+lWlqg0ccTVy7T/HrYaVZ8 dHXh09GFAgxneC+JCdMzDGFaI1LEhMaDv9OhyEYCOjoz60c1lYg2idfFXffSTiFj QRgfesyer8jYWD0pyEQ939EOXKLnR2ClbwqkHvXZNKDf8NtitBeF45hUmxixuDhb GBu+tuBVEHWXJpmCkmh/Xd9iwGPU3w2geGnZXPUpDaERdKlKL/zbzLBpxvP9TpOs 0IMc3ZkZ39jnrMVfDbbloNRKMdbxSSlb/OMyDocZheSLw6QlECALfLZumQZCk759 z5BDS8zvINbpdUrUxLG7ZYTW+6ZXpR7N9nVF+ab2BnTC58J5aUb623FtSOuk1J2/ hMPVhRwdGyHLNccn82t4 =YZJb -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: $CATALINA_HOME/conf/context.xml .. restrict a context?
Thanks, the issue is that my customer does not want to restrict the admin-console in it's war - the rational is anybody can then just redeploy a new admin-console.war and access it (overwrite the restrictions). They want to restrict access to this context from OUTSIDE the actual deployment. Make sense? On Mon, Mar 3, 2014 at 4:22 PM, Christopher Schultz ch...@christopherschultz.net wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Ravi, On 3/3/14, 5:10 PM, Ravi Gupta wrote: Tomcat 6.X RHEL I tried adding the below in order to limit access to /admin-console It worked, but it limits access to EVERY context, which is odd. I am sure I am doing something wrong or I misunderstand how this works I want to put restrictions on the /admin-console context, but I do not want it inside the admin-console.war Again, this works, but other contexts are denied as well! Context path=/admin-console Valve className=org.apache.catalina.valves.RemoteAddrValve deny=* / /Context I'm guessing the file you edited was CATALINA_BASE/conf/context.xml? That's not the right file to edit. Undo all the changes you made to conf/context.xml. Instead, you want to edit the META-INF/context.xml file in your own webapp (or CATALINA_BASE/conf/[engine]/[host]/admin-console.xml if you have manually-deployed your application using an XML descriptor). - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1 Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBCAAGBQJTFQCoAAoJEBzwKT+lPKRYGXQQAKgWOzPpKvC9YvuSJWdDY5Ud 325eSaK73rns77SWz2nUFt3je5GTEFmQAuCyBHueeaGgaFsY9GrkE9/YtsuWxB52 gO22zYywmTtfSY4MNt5z4dolbWfkktcFkLA96FQxa4ZI7ZdvmyL4XRRPJSSKRck3 qushWLC5IhbTknnbbOFm3OAv/xY60dzorB8ashIDjMO1Rm+6xOWf2x3PeTAeuy8K h5rKVi1u2KkMnbMtvJABX2WGdYZA+r/LNozotXHDGApvEVFu4+YtRWpZx2kgeVVG 0pbgLlfmT3cltDGkfOLq7xk11/VJNVR/A276naolfA+lWlqg0ccTVy7T/HrYaVZ8 dHXh09GFAgxneC+JCdMzDGFaI1LEhMaDv9OhyEYCOjoz60c1lYg2idfFXffSTiFj QRgfesyer8jYWD0pyEQ939EOXKLnR2ClbwqkHvXZNKDf8NtitBeF45hUmxixuDhb GBu+tuBVEHWXJpmCkmh/Xd9iwGPU3w2geGnZXPUpDaERdKlKL/zbzLBpxvP9TpOs 0IMc3ZkZ39jnrMVfDbbloNRKMdbxSSlb/OMyDocZheSLw6QlECALfLZumQZCk759 z5BDS8zvINbpdUrUxLG7ZYTW+6ZXpR7N9nVF+ab2BnTC58J5aUb623FtSOuk1J2/ hMPVhRwdGyHLNccn82t4 =YZJb -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: $CATALINA_HOME/conf/context.xml .. restrict a context?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Ravi, (Moving the discussion back onto the list: please reply to the list and not to individuals. That's what community is about.) On 3/3/14, 5:29 PM, Ravi Gupta wrote: Thanks, the issue is that my customer does not want to restrict the admin-console in it's war - the rational is anybody can then just redeploy a new admin-console.war and access it (overwrite the restrictions). They want to restrict access to this context from OUTSIDE the actual deployment. Make sense? It makes perfect sense. To deploy your web application in a safe way, you need to do the following: 0. Start with a stopped Tomcat. 1. Put the WAR wherever you want it to live. CATALINA_BASE/webapps is fine. 2. Extract META-INF/context.xml from your WAR file and place it in CATALINA_BASE/conf/[engine]/[host]/[appname].xml 3. Modify [appname].xml to add whatever restrictions you want. 4. Start Tomcat. If you overwrite the WAR file, the restrictions you have set should be maintained. Note that if you /undeploy/ the webapp and then redeploy it, any customizations will be lost and will have to be re-applied. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1 Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBCAAGBQJTFQPbAAoJEBzwKT+lPKRYRmoQALE8fXXv+UVHkMCwzBHHfyvI FVfO8pxCEk8oxvrMunLjC/E2+O8KVCCSDYEjWYYuQs0L1cKjEWyuF6w0P8QDo6fB lE1pxuShreC1SMMZBEGf9GX0QORPgAB1C4tFnKEYP7/O/0l0KORGh81/AolhroG+ 8UvlNbFeb0LUR/ABHjdc2PN1UVL3FjruFMhkJSu0ZGqK8TpO7D74VWG2B5JD6zy6 ecFKQVSKf7wCLYJ5vXLpyLFJ/H5DKb6c5BBa7L0Edw+bEM8/YM9f7eoXl77TyBup Lhx19LOzrfFqcDNPXpqiSKy8VCEJH0TNd1iegJwWH4uTK/BYOu38pALspQ6piGjJ re8/goyGahK4Ii7A7B6463I/WqzuSwYxzoNYOMFd0db3gp5gzCq8u6MUgx1jTupA iG4f9SvGC4pvytTKujS/c36uHVipn3YbgTZzbsyhUug7VvTn5uSZUN1e68v+y9LA JV0sLGlzay6STujPamVInO6ICOEiqnY5TuoRoedmlYSLC0dkT5Nvpw9G4trL0WMc WZLVlKKgd3eQU4hUBNqeVfnlmwRuE2LFwHdAC1TpyWVsHkNaTtcCMq/YMkl+xAD0 4uka25gHs3g+j7KmGvvo4gjnPY1ODfTJbYrAdlhSZoMkuesyAW8gaYqG4NR6FoWm /tcZDv4FLrEtv5zXrz9l =L2bz -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: $CATALINA_HOME/conf/context.xml .. restrict a context?
Any idea if the same would work for JBOSS 5.X (uses tomcat under the hood)? perhaps it is not the same, but I tried putting admin-console.xml under jboss-5.1.0.GA/server/default/deploy/jbossweb.sar it contains Context path=/admin-console Valve className=org.apache.catalina.valves.RemoteAddrValve deny=* / /Context But I was still able to access http://localhost:8080/admin-console after a bounce? Any suggestions would be apreciated On Mon, Mar 3, 2014 at 4:36 PM, Christopher Schultz ch...@christopherschultz.net wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Ravi, (Moving the discussion back onto the list: please reply to the list and not to individuals. That's what community is about.) On 3/3/14, 5:29 PM, Ravi Gupta wrote: Thanks, the issue is that my customer does not want to restrict the admin-console in it's war - the rational is anybody can then just redeploy a new admin-console.war and access it (overwrite the restrictions). They want to restrict access to this context from OUTSIDE the actual deployment. Make sense? It makes perfect sense. To deploy your web application in a safe way, you need to do the following: 0. Start with a stopped Tomcat. 1. Put the WAR wherever you want it to live. CATALINA_BASE/webapps is fine. 2. Extract META-INF/context.xml from your WAR file and place it in CATALINA_BASE/conf/[engine]/[host]/[appname].xml 3. Modify [appname].xml to add whatever restrictions you want. 4. Start Tomcat. If you overwrite the WAR file, the restrictions you have set should be maintained. Note that if you /undeploy/ the webapp and then redeploy it, any customizations will be lost and will have to be re-applied. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1 Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBCAAGBQJTFQPbAAoJEBzwKT+lPKRYRmoQALE8fXXv+UVHkMCwzBHHfyvI FVfO8pxCEk8oxvrMunLjC/E2+O8KVCCSDYEjWYYuQs0L1cKjEWyuF6w0P8QDo6fB lE1pxuShreC1SMMZBEGf9GX0QORPgAB1C4tFnKEYP7/O/0l0KORGh81/AolhroG+ 8UvlNbFeb0LUR/ABHjdc2PN1UVL3FjruFMhkJSu0ZGqK8TpO7D74VWG2B5JD6zy6 ecFKQVSKf7wCLYJ5vXLpyLFJ/H5DKb6c5BBa7L0Edw+bEM8/YM9f7eoXl77TyBup Lhx19LOzrfFqcDNPXpqiSKy8VCEJH0TNd1iegJwWH4uTK/BYOu38pALspQ6piGjJ re8/goyGahK4Ii7A7B6463I/WqzuSwYxzoNYOMFd0db3gp5gzCq8u6MUgx1jTupA iG4f9SvGC4pvytTKujS/c36uHVipn3YbgTZzbsyhUug7VvTn5uSZUN1e68v+y9LA JV0sLGlzay6STujPamVInO6ICOEiqnY5TuoRoedmlYSLC0dkT5Nvpw9G4trL0WMc WZLVlKKgd3eQU4hUBNqeVfnlmwRuE2LFwHdAC1TpyWVsHkNaTtcCMq/YMkl+xAD0 4uka25gHs3g+j7KmGvvo4gjnPY1ODfTJbYrAdlhSZoMkuesyAW8gaYqG4NR6FoWm /tcZDv4FLrEtv5zXrz9l =L2bz -END PGP SIGNATURE-
Re: $CATALINA_HOME/conf/context.xml .. restrict a context?
According to this, it should match up https://community.jboss.org/wiki/Web-AppContextConfiguration On Mon, Mar 3, 2014 at 4:53 PM, Ravi Gupta rkgupt...@gmail.com wrote: Any idea if the same would work for JBOSS 5.X (uses tomcat under the hood)? perhaps it is not the same, but I tried putting admin-console.xml under jboss-5.1.0.GA/server/default/deploy/jbossweb.sar it contains Context path=/admin-console Valve className=org.apache.catalina.valves.RemoteAddrValve deny=* / /Context But I was still able to access http://localhost:8080/admin-console after a bounce? Any suggestions would be apreciated On Mon, Mar 3, 2014 at 4:36 PM, Christopher Schultz ch...@christopherschultz.net wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Ravi, (Moving the discussion back onto the list: please reply to the list and not to individuals. That's what community is about.) On 3/3/14, 5:29 PM, Ravi Gupta wrote: Thanks, the issue is that my customer does not want to restrict the admin-console in it's war - the rational is anybody can then just redeploy a new admin-console.war and access it (overwrite the restrictions). They want to restrict access to this context from OUTSIDE the actual deployment. Make sense? It makes perfect sense. To deploy your web application in a safe way, you need to do the following: 0. Start with a stopped Tomcat. 1. Put the WAR wherever you want it to live. CATALINA_BASE/webapps is fine. 2. Extract META-INF/context.xml from your WAR file and place it in CATALINA_BASE/conf/[engine]/[host]/[appname].xml 3. Modify [appname].xml to add whatever restrictions you want. 4. Start Tomcat. If you overwrite the WAR file, the restrictions you have set should be maintained. Note that if you /undeploy/ the webapp and then redeploy it, any customizations will be lost and will have to be re-applied. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1 Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBCAAGBQJTFQPbAAoJEBzwKT+lPKRYRmoQALE8fXXv+UVHkMCwzBHHfyvI FVfO8pxCEk8oxvrMunLjC/E2+O8KVCCSDYEjWYYuQs0L1cKjEWyuF6w0P8QDo6fB lE1pxuShreC1SMMZBEGf9GX0QORPgAB1C4tFnKEYP7/O/0l0KORGh81/AolhroG+ 8UvlNbFeb0LUR/ABHjdc2PN1UVL3FjruFMhkJSu0ZGqK8TpO7D74VWG2B5JD6zy6 ecFKQVSKf7wCLYJ5vXLpyLFJ/H5DKb6c5BBa7L0Edw+bEM8/YM9f7eoXl77TyBup Lhx19LOzrfFqcDNPXpqiSKy8VCEJH0TNd1iegJwWH4uTK/BYOu38pALspQ6piGjJ re8/goyGahK4Ii7A7B6463I/WqzuSwYxzoNYOMFd0db3gp5gzCq8u6MUgx1jTupA iG4f9SvGC4pvytTKujS/c36uHVipn3YbgTZzbsyhUug7VvTn5uSZUN1e68v+y9LA JV0sLGlzay6STujPamVInO6ICOEiqnY5TuoRoedmlYSLC0dkT5Nvpw9G4trL0WMc WZLVlKKgd3eQU4hUBNqeVfnlmwRuE2LFwHdAC1TpyWVsHkNaTtcCMq/YMkl+xAD0 4uka25gHs3g+j7KmGvvo4gjnPY1ODfTJbYrAdlhSZoMkuesyAW8gaYqG4NR6FoWm /tcZDv4FLrEtv5zXrz9l =L2bz -END PGP SIGNATURE-
Fwd: $CATALINA_HOME/conf/tomcat-users.xml - access deneid
Hello My employer wants my to put a war file on tomcat server installed in by http://198.57.249.59:8080/ hostgator.com problem is that I can't get to the app manger since I don't have usernameand password. I know that I should edit the above file, I tried through putty but access to file is denied. what should I do?
RE: $CATALINA_HOME/conf/tomcat-users.xml - access deneid
From: ישראל מלאכי [mailto:alayc...@gmail.com] Subject: Fwd: $CATALINA_HOME/conf/tomcat-users.xml - access deneid My employer wants my to put a war file on tomcat server installed in by http://198.57.249.59:8080/ hostgator.com problem is that I can't get to the app manger since I don't have usernameand password. I know that I should edit the above file, I tried through putty but access to file is denied. what should I do? You'll need to contact HostGator support to find out how to get appropriate access to their servers. This has nothing to do with Tomcat itself. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
CATALINA_BASE and CATALINA_HOME deployment
I'm trying to convert my app to use the preferred catalina base and home deployment. I understand that this allows for easier migration between tomcat versions, etc. As a point of reference, I'm reading about how to do this in Tomcat: The Definitive Guide. Also, I'm dealing with 5.5.35, if that matters. I have one question. I understand that the separation of the core tomcat stuff from my instance stuff is good. But the book says to copy the entire conf folder over to my instance folder ( CATALINA_BASE/myapp/conf ). Isn't this copying a bunch of tomcat version specific stuff that I'll have to sift through when it's time to migrate? Will I be able to just upgrade CATALINA_HOME and not upgrade all of that copied conf stuff as well? Thanks, Chad
Re: CATALINA_BASE and CATALINA_HOME deployment
chad.da...@emc.com wrote: I'm trying to convert my app to use the preferred catalina base and home deployment. I understand that this allows for easier migration between tomcat versions, etc. Maybe that is a slight misconception. I think that the separation between catalina_base and catalina_home is /mainly/ directed at allowing someone to run multiple tomcat instances on the same host, with different configurations, but sharing the same (tomcat) code. As a point of reference, I'm reading about how to do this in Tomcat: The Definitive Guide. That may be ok, but why not use the online tomcat documentation ? Last time I looked - and with the exception of the part about logging ;-) - it was quite comprehensible. Also, I'm dealing with 5.5.35, if that matters. Well yes. Why choose an old version that will soon become obsolete (or at least unsupported) ? The current version is 7.0, and the version before that was 6.0. If you are going to make this effort, do it with the latest released version. It will last longer. I have one question. I understand that the separation of the core tomcat stuff from my instance stuff is good. But the book says to copy the entire conf folder over to my instance folder ( CATALINA_BASE/myapp/conf ). That's a strange-sounding location. Maybe you are confused about the term instance ? It means an instance of tomcat, not of your application. The correct folder is catalina_base/conf. The default location for applications running under that separate tomcat instance would be catalina_base/webapps/, with your apps below that one (like catalina_base/webapps/myapp). Isn't this copying a bunch of tomcat version specific stuff that I'll have to sift through when it's time to migrate? Will I be able to just upgrade CATALINA_HOME and not upgrade all of that copied conf stuff as well? Definitely not. The files in the conf folder are quite likely to change between versions (old tags being retired, new tags being added, attributes changing in tags, etc..). The recommended practice when you ugrade to another version is to install a vanilla new version in a new directory, with the vanilla conf files of that new version. Then check that it is working. And then, bring over your modifications to the old vanilla version, into these new conf files, one by one and carefully, consulting the docs at every step to see what's changed. Then when it all works with the new version, remove the old one. Under the catalina_home/catalina_base directory (by default they are the same), there have been (and will be) changes between versions, such as some sub-directories disappearing or being renamed, other ones added, and some stuff that used to be in one place being moved to another. If you try to keep the same directory structure and the same conf files between versions, you are looking for trouble. Note: I am talking about upgrading between major versions, like from tomcat 5.5.x to tomcat 6.0.x, or from 6.0.x to 7.0.x. If you are talking about upgrading from 7.0.x to 7.0.y, then things are a bit different. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: CATALINA_BASE and CATALINA_HOME deployment
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Chad, On 5/25/12 3:31 PM, chad.da...@emc.com wrote: I'm trying to convert my app to use the preferred catalina base and home deployment. I dunno about /preferred/, but it certainly is flexible. I understand that this allows for easier migration between tomcat versions, etc. Absolutely! As a point of reference, I'm reading about how to do this in Tomcat: The Definitive Guide. Also, I'm dealing with 5.5.35, if that matters. CATALINA_BASE and CATALINA_HOME have worked (roughly) the same way since at least as far back as Tomcat 4.1. I have one question. I understand that the separation of the core tomcat stuff from my instance stuff is good. But the book says to copy the entire conf folder over to my instance folder ( CATALINA_BASE/myapp/conf ). Isn't this copying a bunch of tomcat version specific stuff that I'll have to sift through when it's time to migrate? Yes and no. First, you *must* have a separate conf/server.xml file otherwise all your instances will conflict with their port numbers, etc. Same thing with conf/tomcat-users.xml -- that would be a security issue to share that configuration. Technically, you can leave catalina.policy, catalina.properties, context.xml, and logging.properties in CATALINA_HOME/conf and Tomcat will pick them up. You'll have to check, but you may be able to leave web.xml out of CATALINA_BASE/conf and Tomcat will pick-up the one from CATALINA_HOME/conf. Will I be able to just upgrade CATALINA_HOME and not upgrade all of that copied conf stuff as well? When upgrading between major versions of Tomcat (say, 5.5 - 7.0 which you should do at your earliest possible convenience), you *will* have to ditch your server.xml. You will also have to replace your conf/web.xml file with the one that comes with the version of Tomcat that you are using. I think everything else left over (assuming you have left out catalina.policy, etc. as I described above) then you should be good to go after a new server.xml has been installed. When I upgrade from one version to the next, I usually just do a diff of my server.xml and the one that is in CATALINA_HOME/conf of the version I'm /leaving/. Then, I get a fresh copy of server.xml from the *new* version of Tomcat, stick it in CATALINA_BASE/conf/ and apply basically the same changes to it. That way, I don't break things like logging, standard Listener configuration, etc. Hope that helps, - -chris -BEGIN PGP SIGNATURE- Version: GnuPG/MacGPG2 v2.0.17 (Darwin) Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk+/670ACgkQ9CaO5/Lv0PD/GgCeLsr3wzQr0UOTUWphWCATwLFY gPgAoI2GZIcAqUR88oVPfJfM9ZvCV33E =x70f -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: info regarding automatic restart of webapps when modifying $CATALINA_HOME/conf/web.xml
Mark DeSpain wrote: Greetings! Just trying to do some research regarding a behavior my team observed today. We're using some revision of Tomcat 7.0... I don't recall the specific version, but I can look it up if it is relevant. Apparently when someone modifies $CATALINA_HOME/conf/web.xml, Tomcat will reload all web applications in the container. Unfortunately for us, this wreaks havoc on our set of web applications since we've allowed them to express initialization dependencies between each other that are honored on startup (and other scenarios) but not this scenario. So, I'm looking for more information on how one might either disable this particular reload behavior or hook into that behavior so that we can ensure that dependencies are reinitialized accordingly. Can someone point me in the right direction? Either approach will work for us, but I'd be interested in knowing if there is indeed a hook we can tap into. Any input is greatly appreciated. Hi. I'm not a real specialist, but I'll try : 1) changing the behaviour regarding the default web.xml : I do not think that you can change this behaviour without triggering some other maybe undesirable side-effects (such as not reloading modified webapps automatically anymore) 2) hooks : you might want to look at this : http://tomcat.apache.org/tomcat-7.0-doc/config/listeners.html - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: info regarding automatic restart of webapps when modifying $CATALINA_HOME/conf/web.xml
Mark DeSpain mark.desp...@gmail.com wrote: We're using some revision of Tomcat 7.0... I don't recall the specific version, but I can look it up if it is relevant. Normally, the answer to that question would be yes. In this case, you are in luck. Apparently when someone modifies $CATALINA_HOME/conf/web.xml, Tomcat will reload all web applications in the container. Unfortunately for us, this wreaks havoc on our set of web applications since we've allowed them to express initialization dependencies between each other that are honored on startup (and other scenarios) but not this scenario. Opps. Web applications are meant to be independent. So, I'm looking for more information on how one might either disable this particular reload behavior or hook into that behavior so that we can ensure that dependencies are reinitialized accordingly. Can someone point me in the right direction? Either approach will work for us, but I'd be interested in knowing if there is indeed a hook we can tap into. Any input is greatly appreciated. Remove the WatchedResource... entry from $CATALINA_BASE/context.xml Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: info regarding automatic restart of webapps when modifying $CATALINA_HOME/conf/web.xml
Hi Mark T, Thanks for the information about removing the WatchedResource... entry from $CATALINA_BASE/context.xml. While that prevents a web applications from restarting when modifying the web.xml included with it, it does not prevent restarting of all web applications when modifying the web.xml in the server's conf folder. FYI, we currently appear to be using Tomcat 7.0.6, though I suspect we'll be upgrading to the latest sometime soon. ~Mark
info regarding automatic restart of webapps when modifying $CATALINA_HOME/conf/web.xml
Greetings! Just trying to do some research regarding a behavior my team observed today. We're using some revision of Tomcat 7.0... I don't recall the specific version, but I can look it up if it is relevant. Apparently when someone modifies $CATALINA_HOME/conf/web.xml, Tomcat will reload all web applications in the container. Unfortunately for us, this wreaks havoc on our set of web applications since we've allowed them to express initialization dependencies between each other that are honored on startup (and other scenarios) but not this scenario. So, I'm looking for more information on how one might either disable this particular reload behavior or hook into that behavior so that we can ensure that dependencies are reinitialized accordingly. Can someone point me in the right direction? Either approach will work for us, but I'd be interested in knowing if there is indeed a hook we can tap into. Any input is greatly appreciated. Thanks! ~Mark
[Apache_Tomcat]: $CATALINA_HOME/webapps/host-manager/manager.xml
Hi there, I am a newbie to Apache Tomcat. While studying the host-manager application, I found the file $CATALINA_HOME/webapps/host-manager/manager.xml. This file seems to be the configuration file for the manager application (not the host-manager): Context docBase=${catalina.home}/webapps/manager .../ I wonder what the file is used for? I tried to configure the file but neither manager application nor host-manager application is affected. Thanks in advance -- View this message in context: http://old.nabble.com/-Apache_Tomcat-%3A-%24CATALINA_HOME-webapps-host-manager-manager.xml-tp32317403p32317403.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: [Apache_Tomcat]: $CATALINA_HOME/webapps/host-manager/manager.xml
On 23/08/2011 10:12, quanba wrote: Hi there, I am a newbie to Apache Tomcat. While studying the host-manager application, I found the file $CATALINA_HOME/webapps/host-manager/manager.xml. This file seems to be the configuration file for the manager application (not the host-manager): Context docBase=${catalina.home}/webapps/manager .../ I wonder what the file is used for? I tried to configure the file but neither manager application nor host-manager application is affected. http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/manager/host/HostManagerServlet.java?view=annotate Start around line 400. Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: [Apache_Tomcat]: $CATALINA_HOME/webapps/host-manager/manager.xml
Thanks Mark, that's exactly the answer I want Mark Thomas wrote: On 23/08/2011 10:12, quanba wrote: Hi there, I am a newbie to Apache Tomcat. While studying the host-manager application, I found the file $CATALINA_HOME/webapps/host-manager/manager.xml. This file seems to be the configuration file for the manager application (not the host-manager): Context docBase=${catalina.home}/webapps/manager .../ I wonder what the file is used for? I tried to configure the file but neither manager application nor host-manager application is affected. http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/manager/host/HostManagerServlet.java?view=annotate Start around line 400. Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- View this message in context: http://old.nabble.com/-Apache_Tomcat-%3A-%24CATALINA_HOME-webapps-host-manager-manager.xml-tp32317403p32323592.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: class not found in tomcat's JARs (in $CATALINA_HOME/lib)
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Frank, On 12/7/2010 12:59 PM, frank wrote: I set CATALINA_BASE and CATALINA_HOME to my directory like: CATALINA_BASE=/usr/share/mydir CATALINA_HOME=/usr/share/mydir Why did you set either of these environment variables? IF you aren't running multiple instances of Tomcat from a single base install, you never need to set CATALINA_BASE and Tomcata auto-detects CATALINA_HOME when you run any of the startup scripts. then link subdirs (conf/, bin/ ...)of tomcat6 to $CATALINA_HOME Okay, what is tomcat6 and why did you have to link directories at all? Aren't those directories already there? , the lib/ points to /usr/share/tomcat6/lib. IMO, tomcat6-servlet-2.5-api.jar, tomcat6-jsp-2.1-api-6.0.26.jar, tomcat6-el-2.1-api-6.0.26.jar should be automatically be found since they are located at $CATALINA_HOME/lib/. In fact this doesn't work, I got errors (see paste at bottom). However, if I added full path of these JARs to classpath, things worked. I am puzzled, why common class loader doesn't get these files? thank you. I think what you want is: $ export CATALINA_BASE=/usr/share/mydir $ vi ${CATALINA_BASE}/conf/server.xml $ mkdir ${CATALINA_BASE}/webapps $ cp mywar.war ${CATALINA_BASE}/webapps/ $ export CATALINA_HOME=/usr/share/tomcat6 $ ${CATALINA_HOME}/bin/startup.sh That should be all you need. As Pid mentions, it looks like you're using a re-packaged version of Tomcat. You might want to consider reading the documentation for that package maintainer's version of Tomcat to see how you are supposed to run multiple instances. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk0BPywACgkQ9CaO5/Lv0PAJwwCcCP+b7NCANSNgBQUUGdRYdOma VBEAnjjKmH1n4OyHgDL8XdryPpcMyHnM =SG61 -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: what ist $CATALINA_HOME/server ? (debian)
Am 07.12.2010 22:19, schrieb g f: Did you aptitude install tomcat6? If so why not modify the init.d script that came with that. If not perhaps you want to try to use the debs. apt-get install tomcat6 G AFAIK there isn't such a thing like a tomcat6 package under the debian distribution. And I would have to tackle the debianisms in that script. (jsvc e.g.) -- Christoph P.U. Kukulies - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: what ist $CATALINA_HOME/server ? (debian)
Not sure of your distro and your requirements but for squeeze there is: http://packages.debian.org/squeeze/tomcat6 lenny: http://packages.debian.org/lenny/tomcat5.5 Now the script modification is a different story. Cheers, GF On Wed, Dec 8, 2010 at 3:02 AM, Christoph Kukulies k...@kukulies.orgwrote: Am 07.12.2010 22:19, schrieb g f: Did you aptitude install tomcat6? If so why not modify the init.d script that came with that. If not perhaps you want to try to use the debs. apt-get install tomcat6 G AFAIK there isn't such a thing like a tomcat6 package under the debian distribution. And I would have to tackle the debianisms in that script. (jsvc e.g.) -- Christoph P.U. Kukulies - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
what ist $CATALINA_HOME/server ? (debian)
In seeking what screwed my installation I'm stumbling across a directory /usr/share/tomcat5.5/server /usr/share/tomcat5.5# find server server server/classes server/webapps server/webapps/host-manager server/webapps/host-manager/manager.xml server/webapps/host-manager/host-manager.xml server/webapps/host-manager/WEB-INF server/webapps/host-manager/WEB-INF/lib server/webapps/host-manager/WEB-INF/lib/catalina-host-manager.jar server/webapps/host-manager/WEB-INF/web.xml server/webapps/host-manager/images server/webapps/host-manager/images/void.gif server/webapps/host-manager/images/docs.gif server/webapps/host-manager/images/code.gif server/webapps/host-manager/images/fix.gif server/webapps/host-manager/images/add.gif server/webapps/host-manager/images/design.gif server/webapps/host-manager/images/asf-logo.gif server/webapps/host-manager/images/tomcat.gif server/webapps/host-manager/images/update.gif server/webapps/admin server/webapps/admin/server server/webapps/admin/admin.css server/webapps/admin/tree-control-test.css server/webapps/admin/service server/webapps/admin/WEB-INF server/webapps/admin/WEB-INF/struts-config.xml server/webapps/admin/WEB-INF/struts-tiles.tld server/webapps/admin/WEB-INF/struts-html.tld server/webapps/admin/WEB-INF/lib server/webapps/admin/WEB-INF/lib/commons-digester.jar server/webapps/admin/WEB-INF/lib/commons-collections3.jar server/webapps/admin/WEB-INF/lib/commons-beanutils.jar server/webapps/admin/WEB-INF/lib/struts.jar server/webapps/admin/WEB-INF/lib/catalina-admin.jar server/webapps/admin/WEB-INF/controls.tld server/webapps/admin/WEB-INF/struts-logic.tld server/webapps/admin/WEB-INF/struts-bean.tld server/webapps/admin/WEB-INF/struts-nested.tld server/webapps/admin/WEB-INF/web.xml server/webapps/admin/realm server/webapps/admin/context server/webapps/admin/users server/webapps/admin/images server/webapps/admin/images/Thumbs.db server/webapps/admin/images/folder_16_pad.gif server/webapps/admin/images/EnvironmentEntries.gif server/webapps/admin/images/Mailsession.gif server/webapps/admin/images/handledownlast.gif server/webapps/admin/images/Connector.gif server/webapps/admin/images/linelastnode.gif server/webapps/admin/images/Realm.gif server/webapps/admin/images/LoginBackgroundTile.gif server/webapps/admin/images/Login.jpg server/webapps/admin/images/handlerightmiddle.gif server/webapps/admin/images/Groups.gif server/webapps/admin/images/handledownmiddle.gif server/webapps/admin/images/ResourceLink.gif server/webapps/admin/images/Valve.gif server/webapps/admin/images/Logger.gif server/webapps/admin/images/PaperTexture.gif server/webapps/admin/images/Service.gif server/webapps/admin/images/Datasource.gif server/webapps/admin/images/Context.gif server/webapps/admin/images/handlerightlast.gif server/webapps/admin/images/linevertical.gif server/webapps/admin/images/linemiddlenode.gif server/webapps/admin/images/Roles.gif server/webapps/admin/images/Users.gif server/webapps/admin/images/DefaultContext.gif server/webapps/admin/images/BlueTile.gif server/webapps/admin/images/Host.gif server/webapps/admin/images/Server.gif server/webapps/admin/images/TomcatBanner.jpg server/webapps/admin/admin.xml server/webapps/admin/valve server/webapps/admin/host server/webapps/admin/connector server/webapps/admin/resources server/webapps/manager server/webapps/manager/manager.xml server/webapps/manager/status.xsd server/webapps/manager/WEB-INF server/webapps/manager/WEB-INF/lib server/webapps/manager/WEB-INF/lib/commons-fileupload.jar server/webapps/manager/WEB-INF/lib/catalina-manager.jar server/webapps/manager/WEB-INF/lib/commons-io.jar server/webapps/manager/WEB-INF/web.xml server/webapps/manager/images server/webapps/manager/images/void.gif server/webapps/manager/images/docs.gif server/webapps/manager/images/code.gif server/webapps/manager/images/fix.gif server/webapps/manager/images/add.gif server/webapps/manager/images/design.gif server/webapps/manager/images/asf-logo.gif server/webapps/manager/images/tomcat.gif server/webapps/manager/images/update.gif server/webapps/manager/xform.xsl server/webapps/manager/manager-howto.html server/webapps/manager/html-manager-howto.html server/lib server/lib/catalina-optional.jar server/lib/catalina.jar server/lib/tomcat-util.jar server/lib/servlets-default.jar server/lib/servlets-webdav.jar server/lib/servlets-invoker.jar server/lib/tomcat-apr.jar server/lib/servlets-cgi.renametojar server/lib/catalina-ant-jmx.jar server/lib/servlets-ssi.renametojar server/lib/tomcat-http.jar server/lib/catalina-ant.jar server/lib/catalina-storeconfig.jar server/lib/catalina-cluster.jar server/lib/commons-modeler.jar server/lib/tomcat-ajp.jar server/lib/tomcat-jkstatus-ant.jar server/lib/tomcat-coyote.jar What is this? Some Debian specific stuff? Or the way Debian thinks it has to be? How can I get rid of it? -- Christoph P.U. Kukulies - To unsubscribe, e-mail:
RE: what ist $CATALINA_HOME/server ? (debian)
From: Christoph Kukulies [mailto:k...@kukulies.org] Subject: what ist $CATALINA_HOME/server ? (debian) In seeking what screwed my installation I'm stumbling across a directory /usr/share/tomcat5.5/server Nothing wrong with that. What is this? Some Debian specific stuff? No, it's part of every Tomcat 5.5 distribution. Debian may have modified it. How can I get rid of it? You don't want to get rid of it, unless you choose to make your life much simpler by removing the Debian Tomcat packages and going with a real Tomcat download from tomcat.apache.org. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: what ist $CATALINA_HOME/server ? (debian)
2010/12/7 Caldarale, Charles R chuck.caldar...@unisys.com: What is this? Some Debian specific stuff? No, it's part of every Tomcat 5.5 distribution. Debian may have modified it. +1. In TC 5.5 there were separate server, common and shared directories. In TC6+ all those are replaced by a single lib one. (And those administrative webapps were moved to webapps folder where all the other web applications live). More information is here: [1] http://tomcat.apache.org/tomcat-5.5-doc/class-loader-howto.html [2] http://tomcat.apache.org/migration.html You can get youself a fresh copy of TC 5.5 from [3] and compare. [3] http://tomcat.apache.org/download-55.cgi Best regards, Konstantin Kolinko - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: what ist $CATALINA_HOME/server ? (debian)
Am 07.12.2010 16:15, schrieb Konstantin Kolinko: 2010/12/7 Caldarale, Charles Rchuck.caldar...@unisys.com: What is this? Some Debian specific stuff? No, it's part of every Tomcat 5.5 distribution. Debian may have modified it. +1. In TC 5.5 there were separate server, common and shared directories. In TC6+ all those are replaced by a single lib one. (And those administrative webapps were moved to webapps folder where all the other web applications live). More information is here: [1] http://tomcat.apache.org/tomcat-5.5-doc/class-loader-howto.html [2] http://tomcat.apache.org/migration.html You can get youself a fresh copy of TC 5.5 from [3] and compare. [3] http://tomcat.apache.org/download-55.cgi Thanks. Can be found any instructions to build your own /etc/init.d/tomcat_startup script. catalina.sh seems to have provisions for it but I don't see a hook where to put in the user (e.g. tomcat55 or tomcat6) catalina runs under. -- Christoph P.U. Kukulies - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
class not found in tomcat's JARs (in $CATALINA_HOME/lib)
Hi Experts: I have read class not found in FAQ and class loader howto of tomcat6, unfortunately, they don't resolve my problem. I set CATALINA_BASE and CATALINA_HOME to my directory like: CATALINA_BASE=/usr/share/mydir CATALINA_HOME=/usr/share/mydir then link subdirs (conf/, bin/ ...)of tomcat6 to $CATALINA_HOME, the lib/ points to /usr/share/tomcat6/lib. IMO, tomcat6-servlet-2.5-api.jar, tomcat6-jsp-2.1-api-6.0.26.jar, tomcat6-el-2.1-api-6.0.26.jar should be automatically be found since they are located at $CATALINA_HOME/lib/. In fact this doesn't work, I got errors (see paste at bottom). However, if I added full path of these JARs to classpath, things worked. I am puzzled, why common class loader doesn't get these files? thank you. *type* Exception report *message* *description* _The server encountered an internal error () that prevented it from fulfilling this request._ *exception* org.apache.jasper.JasperException: javax.servlet.ServletException: java.lang.NoClassDefFoundError: javax/servlet/jsp/tagext/TagSupport org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:491) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:401) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260) javax.servlet.http.HttpServlet.service(HttpServlet.java:717) *root cause* javax.servlet.ServletException: java.lang.NoClassDefFoundError: javax/servlet/jsp/tagext/TagSupport org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:862) org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:791) org.apache.jsp.index_jsp._jspService(index_jsp.java:1349) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) javax.servlet.http.HttpServlet.service(HttpServlet.java:717) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:377) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260) javax.servlet.http.HttpServlet.service(HttpServlet.java:717) *root cause* java.lang.NoClassDefFoundError: javax/servlet/jsp/tagext/TagSupport java.lang.ClassLoader.defineClass1(Native Method) java.lang.ClassLoader.defineClass(ClassLoader.java:634) java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) java.net.URLClassLoader.defineClass(URLClassLoader.java:277) java.net.URLClassLoader.access$000(URLClassLoader.java:73) java.net.URLClassLoader$1.run(URLClassLoader.java:212) java.security.AccessController.doPrivileged(Native Method) java.net.URLClassLoader.findClass(URLClassLoader.java:205) java.lang.ClassLoader.loadClass(ClassLoader.java:321) sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294) java.lang.ClassLoader.loadClass(ClassLoader.java:266) java.lang.ClassLoader.defineClass1(Native Method) java.lang.ClassLoader.defineClass(ClassLoader.java:634) java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) java.net.URLClassLoader.defineClass(URLClassLoader.java:277) java.net.URLClassLoader.access$000(URLClassLoader.java:73) java.net.URLClassLoader$1.run(URLClassLoader.java:212) java.security.AccessController.doPrivileged(Native Method) java.net.URLClassLoader.findClass(URLClassLoader.java:205) java.lang.ClassLoader.loadClass(ClassLoader.java:321) sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294) java.lang.ClassLoader.loadClass(ClassLoader.java:266) org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1431) org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1361) org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:128) org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:66) org.apache.jsp.index_jsp._jspx_meth_fmt_005fsetBundle_005f0(index_jsp.java:1361) org.apache.jsp.index_jsp._jspService(index_jsp.java:61) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) javax.servlet.http.HttpServlet.service(HttpServlet.java:717) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:377) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260) javax.servlet.http.HttpServlet.service(HttpServlet.java:717) *root cause* java.lang.ClassNotFoundException: javax.servlet.jsp.tagext.TagSupport java.net.URLClassLoader$1.run(URLClassLoader.java:217
Re: class not found in tomcat's JARs (in $CATALINA_HOME/lib)
Out of curiosity, couldn't you use the information in RUNNING.txt under Advanced Configuration - Multiple Tomcat Instances to meet your requirements? . . . just a thought. /mde/ - Original Message From: frank fr...@cloud.com Hi Experts: I have read class not found in FAQ and class loader howto of tomcat6, unfortunately, they don't resolve my problem. I set CATALINA_BASE and CATALINA_HOME to my directory like: CATALINA_BASE=/usr/share/mydir CATALINA_HOME=/usr/share/mydir then link subdirs (conf/, bin/ ...)of tomcat6 to $CATALINA_HOME, the lib/ points to /usr/share/tomcat6/lib. IMO, tomcat6-servlet-2.5-api.jar, tomcat6-jsp-2.1-api-6.0.26.jar, tomcat6-el-2.1-api-6.0.26.jar should be automatically be found since they are located at $CATALINA_HOME/lib/. In fact this doesn't work, I got errors (see paste at bottom). However, if I added full path of these JARs to classpath, things worked. I am puzzled, why common class loader doesn't get these files? thank you. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: class not found in tomcat's JARs (in $CATALINA_HOME/lib)
On 12/7/10 5:59 PM, frank wrote: Hi Experts: I have read class not found in FAQ and class loader howto of tomcat6, unfortunately, they don't resolve my problem. I set CATALINA_BASE and CATALINA_HOME to my directory like: CATALINA_BASE=/usr/share/mydir CATALINA_HOME=/usr/share/mydir then link subdirs (conf/, bin/ ...)of tomcat6 to $CATALINA_HOME, the lib/ points to /usr/share/tomcat6/lib. IMO, tomcat6-servlet-2.5-api.jar, tomcat6-jsp-2.1-api-6.0.26.jar, tomcat6-el-2.1-api-6.0.26.jar should be automatically be found since they are located at $CATALINA_HOME/lib/. In fact this doesn't work, I got errors (see paste at bottom). However, if I added full path of these JARs to classpath, things worked. I am puzzled, why common class loader doesn't get these files? thank you. These are not jars shipped with ASF released Tomcat. I suspect you're using a repackaged version; I'm not sure how much impact that will have, but thenhaven't indicated how these new directories are referenced during an attempt to start a Tomcat instance. p *type* Exception report *message* *description* _The server encountered an internal error () that prevented it from fulfilling this request._ *exception* org.apache.jasper.JasperException: javax.servlet.ServletException: java.lang.NoClassDefFoundError: javax/servlet/jsp/tagext/TagSupport org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:491) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:401) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260) javax.servlet.http.HttpServlet.service(HttpServlet.java:717) *root cause* javax.servlet.ServletException: java.lang.NoClassDefFoundError: javax/servlet/jsp/tagext/TagSupport org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:862) org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:791) org.apache.jsp.index_jsp._jspService(index_jsp.java:1349) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) javax.servlet.http.HttpServlet.service(HttpServlet.java:717) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:377) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260) javax.servlet.http.HttpServlet.service(HttpServlet.java:717) *root cause* java.lang.NoClassDefFoundError: javax/servlet/jsp/tagext/TagSupport java.lang.ClassLoader.defineClass1(Native Method) java.lang.ClassLoader.defineClass(ClassLoader.java:634) java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) java.net.URLClassLoader.defineClass(URLClassLoader.java:277) java.net.URLClassLoader.access$000(URLClassLoader.java:73) java.net.URLClassLoader$1.run(URLClassLoader.java:212) java.security.AccessController.doPrivileged(Native Method) java.net.URLClassLoader.findClass(URLClassLoader.java:205) java.lang.ClassLoader.loadClass(ClassLoader.java:321) sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294) java.lang.ClassLoader.loadClass(ClassLoader.java:266) java.lang.ClassLoader.defineClass1(Native Method) java.lang.ClassLoader.defineClass(ClassLoader.java:634) java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) java.net.URLClassLoader.defineClass(URLClassLoader.java:277) java.net.URLClassLoader.access$000(URLClassLoader.java:73) java.net.URLClassLoader$1.run(URLClassLoader.java:212) java.security.AccessController.doPrivileged(Native Method) java.net.URLClassLoader.findClass(URLClassLoader.java:205) java.lang.ClassLoader.loadClass(ClassLoader.java:321) sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294) java.lang.ClassLoader.loadClass(ClassLoader.java:266) org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1431) org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1361) org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:128) org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:66) org.apache.jsp.index_jsp._jspx_meth_fmt_005fsetBundle_005f0(index_jsp.java:1361) org.apache.jsp.index_jsp._jspService(index_jsp.java:61) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) javax.servlet.http.HttpServlet.service(HttpServlet.java:717) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:377) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260
Re: what ist $CATALINA_HOME/server ? (debian)
On 7.12.2010 18:45, Christoph Kukulies wrote: Can be found any instructions to build your own /etc/init.d/tomcat_startup script. catalina.sh seems to have provisions for it but I don't see a hook where to put in the user (e.g. tomcat55 or tomcat6) catalina runs under. No need to have a hook there: catalina.sh should be run using the account you wish to use to run your Tomcat. -- ..Juha - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: what ist $CATALINA_HOME/server ? (debian)
Did you aptitude install tomcat6? If so why not modify the init.d script that came with that. If not perhaps you want to try to use the debs. apt-get install tomcat6 G On Tue, Dec 7, 2010 at 1:45 PM, Juha Laiho juha.la...@iki.fi wrote: On 7.12.2010 18:45, Christoph Kukulies wrote: Can be found any instructions to build your own /etc/init.d/tomcat_startup script. catalina.sh seems to have provisions for it but I don't see a hook where to put in the user (e.g. tomcat55 or tomcat6) catalina runs under. No need to have a hook there: catalina.sh should be run using the account you wish to use to run your Tomcat. -- ..Juha - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
how to setup HOME_PATH for Java and CATALINA_HOME
I need to set up the environment variable JAVA_HOME and and CATALINA_HOME to start some web and Java EE, am little bit confused with conflicting information. When I run java -version ie get java version 1.6.0_18 OpenJDK Runtime Environment (IcedTea6 1.8.2) (fedora-43.1.8.2.fc13-x86_64) OpenJDK 64-Bit Server VM (build 14.0-b16, mixed mode) When I run which java I get /usr/bin/java[/QUOTE] checking my usr/share I see several directories java (full of files and directories) java-1.3.0 (1 jar in it) java-1.3.1 (empty) java-1.4.0 (empty) java-1.5.0 (empty) java-1.6.0 (empty) java-1.7.0 (empty) Issuing the echo %PATH gives the following /usr/lib64/qt-3.3/bin:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/lib64/ccache:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/salam/bin In eclipse helios 3.6, I see in preferences Java I have /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64 How one can check that he has Java EE setup correctly with Apache Tomcat 6 ? I have Apache Tomcat up and running and need to setup CATALINA_HOME. In the usr/share/java directory, I have a directory tomcat6 as well as a tomcat6 directory in /usr/share/. In Eclipse, when I try to add a server, eclipse doesnt see that I have a type of tomcat server. I have found so many articles on the web but no 2 articles are similar. I tried to browse Sun's Path setup tutorial but it seems it is not available anymore. Thanks for your help - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: how to setup HOME_PATH for Java and CATALINA_HOME
On 18/11/2010 09:46, Salam Y. ELIAS wrote: I need to set up the environment variable JAVA_HOME and and CATALINA_HOME to start some web and Java EE, am little bit confused with conflicting information. OK. No problem. When I run java -version ie get java version 1.6.0_18 OpenJDK Runtime Environment (IcedTea6 1.8.2) (fedora-43.1.8.2.fc13-x86_64) OpenJDK 64-Bit Server VM (build 14.0-b16, mixed mode) When I run which java I get /usr/bin/java[/QUOTE] OK so far. checking my usr/share I see several directories java (full of files and directories) java-1.3.0 (1 jar in it) java-1.3.1 (empty) java-1.4.0 (empty) java-1.5.0 (empty) java-1.6.0 (empty) java-1.7.0 (empty) Issuing the echo %PATH gives the following /usr/lib64/qt-3.3/bin:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/lib64/ccache:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/salam/bin In eclipse helios 3.6, I see in preferences Java I have /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64 How one can check that he has Java EE setup correctly with Apache Tomcat 6 ? If you're running Tomcat inside an IDE, it'll configure both for you. If you're running Tomcat on the OS, you can type: echo $JAVA_HOME to find out if the variable is already set. I have Apache Tomcat up and running and need to setup CATALINA_HOME. If you already have it running, why do you need to set CATALINA_HOME? CATALINA_HOME CATALINA_BASE are set automatically by Tomcat when it starts up. You only need to set CATALINA_BASE if you are configuring multiple separate Tomcat instances while using the same binary. What are you trying to achieve? In the usr/share/java directory, I have a directory tomcat6 as well as a tomcat6 directory in /usr/share/. What is in those directories? How did you install Tomcat, by downloading a package in your OS or by downloading Tomcat from the tomcat.apache.org site? p In Eclipse, when I try to add a server, eclipse doesnt see that I have a type of tomcat server. I have found so many articles on the web but no 2 articles are similar. I tried to browse Sun's Path setup tutorial but it seems it is not available anymore. Thanks for your help - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org 0x62590808.asc Description: application/pgp-keys signature.asc Description: OpenPGP digital signature
Re: how to setup HOME_PATH for Java and CATALINA_HOME
From this and other messages, it looks like you're running everything installed from the Fedora distribution. While I run Fedora (just upgraded to Fedora 14), I don't use any of the distribution-supplied packages for Java, Tomcat, or the IDE (my preference being NetBeans). To get the Oracle / Sun Java installed, just download the appropriate files from Oracle. If you use the RPM packages, you can then use the alternatives program to switch between the various implementations. A detailed discussion on Fedora's Java implementation can be found here: http://fedoraproject.org/wiki/Java Then you will need to either inject Oracle's Java into the path before the Fedora-supplied Java or use the alternatives program to configure and switch between Java packages. The latter is more in line with the OS, while the former is what I currently do. Here's one link on how to use the alternatives program: http://www.if-not-true-then-false.com/2010/install-sun-oracle-java-jdk-jre-6-on-fedora-centos-red-hat-rhel/ I took a brief look at the Fedora-supplied Tomcat. As with many other distributions, the software is split across multiple packages, and contains extraneous material. If you're doing development, it's far easier to download a copy of Tomcat from tomcat.apache.org, unpack it somewhere handy, and then run it. I maintain multiple copies of Tomcat in ~/Apache along with various modifications to run Solr, Jetspeed, OpenPortal, Pluto, some virtual hosts, and some clusters. No, I don't run all of these at once. Your other problem is when you start using log4j in your application and want to build the war file. Normally when you add a server to NetBeans or (I presume) Eclipse, the IDE will use the server-supplied jar files to resolve references. The IDE will base which jars to pull from the server based on the type of server you've defined for a particular project. The problem is that Tomcat (as others have pointed out) does not come with log4j by default. If Eclipse is using the default definition of Tomcat, then a log4j jar file will not be included in the build path since the default installation does not have it. If you are set on running your application with Fedora's Tomcat distribution, then you will have to include log4j in your Eclipse project, but have it not added to the war file. If you are using a stock version of Tomcat, then you will have to add log4j to your project for both compilation and creation of the war. Since I don't normally use Eclipse, I have no real idea how to do this. My personal preferences are: 1. Install Java JRE/SDK/Docs from Oracle Either alter the path or use alternatives to manage multiple Java versions 2. Install Tomcat from ASF into my home directory for development 3. Install IDE of choice from that vendor. This makes getting help from the various mailing lists (Java, IDE, Tomcat) much easier. The only downside is that you will have to manage updates for these components manually. However, at least Java can be managed via yum (just download the RPM packages from Oracle). . . . . just my two cents /mde/ - Original Message From: Salam Y. ELIAS salamli...@free.fr To: users@tomcat.apache.org Sent: Thu, November 18, 2010 1:46:54 AM Subject: how to setup HOME_PATH for Java and CATALINA_HOME I need to set up the environment variable JAVA_HOME and and CATALINA_HOME to start some web and Java EE, am little bit confused with conflicting information. When I run java -version ie get java version 1.6.0_18 OpenJDK Runtime Environment (IcedTea6 1.8.2) (fedora-43.1.8.2.fc13-x86_64) OpenJDK 64-Bit Server VM (build 14.0-b16, mixed mode) When I run which java I get /usr/bin/java[/QUOTE] checking my usr/share I see several directories java (full of files and directories) java-1.3.0 (1 jar in it) java-1.3.1 (empty) java-1.4.0 (empty) java-1.5.0 (empty) java-1.6.0 (empty) java-1.7.0 (empty) Issuing the echo %PATH gives the following /usr/lib64/qt-3.3/bin:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/lib64/ccache:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/salam/bin In eclipse helios 3.6, I see in preferences Java I have /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64 How one can check that he has Java EE setup correctly with Apache Tomcat 6 ? I have Apache Tomcat up and running and need to setup CATALINA_HOME. In the usr/share/java directory, I have a directory tomcat6 as well as a tomcat6 directory in /usr/share/. In Eclipse, when I try to add a server, eclipse doesnt see that I have a type of tomcat server. I have found so many articles on the web but no 2 articles are similar. I tried to browse Sun's Path setup tutorial but it seems it is not available anymore. Thanks for your help - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h
Re: how to setup HOME_PATH for Java and CATALINA_HOME
So many thanks for the detailed explanation. I use eclipse 3.6 but not the one shipped with fedora 13 Regards On Thu, 2010-11-18 at 12:08 -0800, Mark Eggers wrote: From this and other messages, it looks like you're running everything installed from the Fedora distribution. While I run Fedora (just upgraded to Fedora 14), I don't use any of the distribution-supplied packages for Java, Tomcat, or the IDE (my preference being NetBeans). To get the Oracle / Sun Java installed, just download the appropriate files from Oracle. If you use the RPM packages, you can then use the alternatives program to switch between the various implementations. A detailed discussion on Fedora's Java implementation can be found here: http://fedoraproject.org/wiki/Java Then you will need to either inject Oracle's Java into the path before the Fedora-supplied Java or use the alternatives program to configure and switch between Java packages. The latter is more in line with the OS, while the former is what I currently do. Here's one link on how to use the alternatives program: http://www.if-not-true-then-false.com/2010/install-sun-oracle-java-jdk-jre-6-on-fedora-centos-red-hat-rhel/ I took a brief look at the Fedora-supplied Tomcat. As with many other distributions, the software is split across multiple packages, and contains extraneous material. If you're doing development, it's far easier to download a copy of Tomcat from tomcat.apache.org, unpack it somewhere handy, and then run it. I maintain multiple copies of Tomcat in ~/Apache along with various modifications to run Solr, Jetspeed, OpenPortal, Pluto, some virtual hosts, and some clusters. No, I don't run all of these at once. Your other problem is when you start using log4j in your application and want to build the war file. Normally when you add a server to NetBeans or (I presume) Eclipse, the IDE will use the server-supplied jar files to resolve references. The IDE will base which jars to pull from the server based on the type of server you've defined for a particular project. The problem is that Tomcat (as others have pointed out) does not come with log4j by default. If Eclipse is using the default definition of Tomcat, then a log4j jar file will not be included in the build path since the default installation does not have it. If you are set on running your application with Fedora's Tomcat distribution, then you will have to include log4j in your Eclipse project, but have it not added to the war file. If you are using a stock version of Tomcat, then you will have to add log4j to your project for both compilation and creation of the war. Since I don't normally use Eclipse, I have no real idea how to do this. My personal preferences are: 1. Install Java JRE/SDK/Docs from Oracle Either alter the path or use alternatives to manage multiple Java versions 2. Install Tomcat from ASF into my home directory for development 3. Install IDE of choice from that vendor. This makes getting help from the various mailing lists (Java, IDE, Tomcat) much easier. The only downside is that you will have to manage updates for these components manually. However, at least Java can be managed via yum (just download the RPM packages from Oracle). . . . . just my two cents /mde/ - Original Message From: Salam Y. ELIAS salamli...@free.fr To: users@tomcat.apache.org Sent: Thu, November 18, 2010 1:46:54 AM Subject: how to setup HOME_PATH for Java and CATALINA_HOME I need to set up the environment variable JAVA_HOME and and CATALINA_HOME to start some web and Java EE, am little bit confused with conflicting information. When I run java -version ie get java version 1.6.0_18 OpenJDK Runtime Environment (IcedTea6 1.8.2) (fedora-43.1.8.2.fc13-x86_64) OpenJDK 64-Bit Server VM (build 14.0-b16, mixed mode) When I run which java I get /usr/bin/java[/QUOTE] checking my usr/share I see several directories java (full of files and directories) java-1.3.0 (1 jar in it) java-1.3.1 (empty) java-1.4.0 (empty) java-1.5.0 (empty) java-1.6.0 (empty) java-1.7.0 (empty) Issuing the echo %PATH gives the following /usr/lib64/qt-3.3/bin:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/lib64/ccache:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/salam/bin In eclipse helios 3.6, I see in preferences Java I have /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64 How one can check that he has Java EE setup correctly with Apache Tomcat 6 ? I have Apache Tomcat up and running and need to setup CATALINA_HOME. In the usr/share/java directory, I have a directory tomcat6 as well as a tomcat6 directory in /usr/share/. In Eclipse, when I try to add a server, eclipse doesnt see that I have a type of tomcat server. I have found so many articles on the web
Re: /META-INF/context.xml is being copied to $CATALINA_HOME/conf/my_engine/my_app/ROOT.xml
Dave Cherkassky wrote: ... Just a note : in the setup you showed, most if not all Alias tags are unnecessary, since they just duplicate the name you have in the Host tag. You need an Alias tag only if you want to access the same virtual host through different DNS names. Like : Host name=www.company.com ... Aliasbigserver.company.com/Alias Aliassun03.company.com/Alias ... /Host Considering how java works, you'd probably be saving yourself a few dozen object instances just by removing those Alias things.. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
/META-INF/context.xml is being copied to $CATALINA_HOME/conf/my_engine/my_app/ROOT.xml
Dear Tomcat community: Here's my setup: - I am running Apache Tomcat/6.0.24. - I am deploying the my applications 'exploded' -- i.e. NOT as a war file. - each application is defined by a /META-INF/context.xml in the respective appBase directory. - I have several virtual hosts: Service name=my_service Connector protocol=AJP/1.3 port=8009 / Engine name=my_engine defaultHost=proj-2-1 !-- Default host -- Host name=proj-2-1 appBase=/home/webadmin/proj-2-1.djinnsoft.com unpackWARs=false ... /Host !-- UAT site -- Host name='hg.djinnsoft.com' unpackWARs='false' appBase='/home/webadmin/hg.djinnsoft.com/appBase' workDir='/home/webadmin/work/hg.djinnsoft.com' Aliashg.djinnsoft.com/Alias ... /Host !-- QA site -- Host name='test-hg.djinnsoft.com' unpackWARs='false' appBase='/home/webadmin/test-hg.djinnsoft.com/appBase' workDir='/home/webadmin/work/test-hg.djinnsoft.com' Aliastest-hg.djinnsoft.com/Alias ... /Host /Engine /Service Here'smy question/problem: I've noticed that the /META-INF/context.xml files are being copied from the respective appBase directories to $CATALINA_HOME/conf/my_engine directory. For example: # ls /opt/tomcat6/conf/my_engine/hg.djinnsoft.com/ROOT.xml /opt/tomcat6/conf/my_engine/hg.djinnsoft.com/ROOT.xml # ls /opt/tomcat6/conf/my_engine/test-hg.djinnsoft.com/ROOT.xml /opt/tomcat6/conf/my_engine/test-hg.djinnsoft.com/ROOT.xml This behaviour is unexpected for two reasons: - I have another system, which is configured identically (for another client), except that the Tomcat version is 6.0.18. The older Tomcat version is not copying files like this. - I can't find anything in the documentation that talks about copying the context.xml files for Host container (not to be confused with copying context.xml for the Context container, which might happen on occasion). Is this a new bug? Did I do something wrong? Did the Tomcat behaviour change in an undocumented fashion? Thanks, -- Dave Cherkassky VP of Software Development DJiNN Software Inc. 416.504.1354 - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: /META-INF/context.xml is being copied to $CATALINA_HOME/conf/my_engine/my_app/ROOT.xml
On 24/03/2010 15:44, Dave Cherkassky wrote: Dear Tomcat community: Here's my setup: - I am running Apache Tomcat/6.0.24. - I am deploying the my applications 'exploded' -- i.e. NOT as a war file. - each application is defined by a /META-INF/context.xml in the respective appBase directory. - I have several virtual hosts: Service name=my_service Connector protocol=AJP/1.3 port=8009 / Engine name=my_engine defaultHost=proj-2-1 !-- Default host -- Host name=proj-2-1 appBase=/home/webadmin/proj-2-1.djinnsoft.com unpackWARs=false ... /Host !-- UAT site -- Host name='hg.djinnsoft.com' unpackWARs='false' appBase='/home/webadmin/hg.djinnsoft.com/appBase' workDir='/home/webadmin/work/hg.djinnsoft.com' Aliashg.djinnsoft.com/Alias ... /Host !-- QA site -- Host name='test-hg.djinnsoft.com' unpackWARs='false' appBase='/home/webadmin/test-hg.djinnsoft.com/appBase' workDir='/home/webadmin/work/test-hg.djinnsoft.com' Aliastest-hg.djinnsoft.com/Alias ... /Host /Engine /Service Here'smy question/problem: I've noticed that the /META-INF/context.xml files are being copied from the respective appBase directories to $CATALINA_HOME/conf/my_engine directory. For example: # ls /opt/tomcat6/conf/my_engine/hg.djinnsoft.com/ROOT.xml /opt/tomcat6/conf/my_engine/hg.djinnsoft.com/ROOT.xml # ls /opt/tomcat6/conf/my_engine/test-hg.djinnsoft.com/ROOT.xml /opt/tomcat6/conf/my_engine/test-hg.djinnsoft.com/ROOT.xml This behaviour is unexpected for two reasons: - I have another system, which is configured identically (for another client), except that the Tomcat version is 6.0.18. The older Tomcat version is not copying files like this. - I can't find anything in the documentation that talks about copying the context.xml files for Host container (not to be confused with copying context.xml for the Context container, which might happen on occasion). Is this a new bug? Why is it a bug? Did I do something wrong? Nope. Did the Tomcat behaviour change in an undocumented fashion? See notes for 6.0.19. http://tomcat.apache.org/tomcat-6.0-doc/changelog.html p Thanks, -- Dave Cherkassky VP of Software Development DJiNN Software Inc. 416.504.1354 - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: /META-INF/context.xml is being copied to $CATALINA_HOME/conf/my_engine/my_app/ROOT.xml
See below: Is this a new bug? Why is it a bug? Sorry, I was not implying anything :) I was just wondering why the behaviour changed. Did the Tomcat behaviour change in an undocumented fashion? See notes for 6.0.19. http://tomcat.apache.org/tomcat-6.0-doc/changelog.html Ah, this is a side effect of fixing issue https://issues.apache.org/bugzilla/show_bug.cgi?id=42747 right? Subtle! I wish that http://tomcat.apache.org/tomcat-6.0-doc/config/host.html has explained this -- would have saved a lot of time. Anyhoo, it all makes sense now. Thanks for your help. -- Dave Cherkassky VP of Software Development DJiNN Software Inc. 416.504.1354 p Thanks, -- Dave Cherkassky VP of Software Development DJiNN Software Inc. 416.504.1354 - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: How to access webapp classes from a Context/Manager implementation (jar located in in $CATALINA_HOME/lib/)
Hi Konstantin, On Mon, 2010-01-11 at 05:19 +0300, Konstantin Kolinko wrote: 2010/1/11 Martin Grotzke martin.grot...@javakaffee.de: On Mon, 2010-01-11 at 02:54 +0300, Konstantin Kolinko wrote: 2010/1/10 Martin Grotzke martin.grot...@javakaffee.de: Hi, Jan 10, 2010 2:57:51 PM org.apache.catalina.connector.CoyoteAdapter service SEVERE: An exception or error occurred in the container during the request processing java.lang.NoClassDefFoundError: org/joda/time/format/ISODateTimeFormat at de.javakaffee.web.msm.serializer.javolution.JodaDateTimeFormat.clinit(JodaDateTimeFormat.java:35) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:247) So, JodaDateTimeFormat was found and its clinit was called, but ISODateTimeFormat was not. JodaDateTimeFormat is the joda DateTime serializer shipped with the memcached-session-manager (msm), which should be used/activated if joda is available in the webapp classpath. ISODateTimeFormat is a class provided by joda. Where have you placed your joda jar? The joda jar is placed in WEB-INF/lib of the application. I don't want to have this in $CATALINA_HOME/lib as joda serialization shall only be supported if it's required by the webapp. The JodaDateTimeFormat comes with the msm jar located in tomcat's lib. That won't work. A class loaded from Common classloader cannot depend on classes that are in the Webapp classloader. Place them in the same place: either both in WEB-INF/lib, or both in $CATALINA_HOME/lib Thanx for this simple description, now I got it. A very simple test with my JodaDateTimeFormat placed in WEB-INF/lib is working - looks good! You may learn how java.lang.Class.forName() is called by the VM to load dependent classes, but there is a simple concern, that should be understandable: - when a web application is stopped (undeployed), all its assets have to be removed from memory. - webapp classloader belongs to the application, and takes some steps to destroy itself, when the application is stopped - classloader knows, what classes it has already loaded Simple, makes sense. When JodaDateTimeFormat class belongs to the Common classloader, it will be loaded in memory as long as Tomcat is running, and thus cannot depend on classes in the Webapp which are relatively short-lived. Implementation-wise that is class loader delegation model. The Webapp classloader is not a parent of the Common one. Reading docs again now with your explanation and the delegation model in mind I'd say that it's already in the docs :) Thanx for your help, cheers, Martin Also please read http://tomcat.apache.org/tomcat-6.0-doc/class-loader-howto.html I've already done that, but I didn't find the information to solve this issue. Also reading again didn't help ;-) Thanx cheers, Martin Best regards, Konstantin Kolinko - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org signature.asc Description: This is a digitally signed message part
How to access webapp classes from a Context/Manager implementation (jar located in in $CATALINA_HOME/lib/)
Hi, for some feature of the memcached-session-manager (memcached-based session failover, [1]) I want to access/reference webapplication classes (in WEB-INF/lib/) directly from my manager implementation (subclasses o.a.catalina.session.ManagerBase, registered via Context/Manager) when tomcat starts. Alternatively, I would like to do this during request time (in the context of a request). Unfortunately, this doesn't seem to work (the issue is describe later, below). The strange thing is that basically the memcached-session-manager (msm) already needs to have access to classes from the webapp, as it serialized/deserializes them (in the context of a request). In these cases I use the manager.getContainer().getLoader().getClassLoader(), which reports to be a WebappClassLoader. The exact issue that I have now is that I want to ship msm with custom serializers for certain types that are used when some class is avaible: e.g. if the application uses joda DateTime I want to activate a custom serializer for joda DateTime. The code that tries to load the serializer for joda DateTime looks like this: public class CustomFormatLoader { ... public static XMLFormat?[] loadFormats( final ClassLoader classLoader ) { final ListXMLFormat? result = new ArrayListXMLFormat?(); try { // see if we can load the JodaDateTimeFormat final XMLFormat? xmlFormat = (XMLFormat?) Class.forName( de.javakaffee.web.msm.serializer.javolution.JodaDateTimeFormat, true, classLoader ).newInstance(); result.add( xmlFormat ); LOG.info( Loaded JodaDateTimeFormat. ); } catch ( final Exception e ) { LOG.info( JodaDateTimeFormat not loaded (joda seems to be not available). ); } return result.toArray( new XMLFormat?[result.size()] ); } } The JodaDateTimeFormat: public class JodaDateTimeFormat extends XMLFormatDateTime { private static final DateTimeFormatter FORMAT = ISODateTimeFormat.basicDateTime(); /** * @param cls */ protected JodaDateTimeFormat() { super( DateTime.class ); } ... } When I try to loadFormats in the context of a request, this exception is thrown: Jan 10, 2010 2:57:51 PM org.apache.catalina.connector.CoyoteAdapter service SEVERE: An exception or error occurred in the container during the request processing java.lang.NoClassDefFoundError: org/joda/time/format/ISODateTimeFormat at de.javakaffee.web.msm.serializer.javolution.JodaDateTimeFormat.clinit(JodaDateTimeFormat.java:35) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:247) at de.javakaffee.web.msm.serializer.javolution.CustomFormatLoader.loadFormats(CustomFormatLoader.java:46) at de.javakaffee.web.msm.serializer.javolution.ReflectionBinding.getFormat(ReflectionBinding.java:134) at javolution.xml.XMLFormat$OutputElement.add(XMLFormat.java:815) at javolution.xml.XMLObjectWriter.write(XMLObjectWriter.java:242) at de.javakaffee.web.msm.serializer.javolution.JavolutionTranscoder.serialize(JavolutionTranscoder.java:108) at net.spy.memcached.transcoders.SerializingTranscoder.encode(SerializingTranscoder.java:135) at net.spy.memcached.MemcachedClient.asyncStore(MemcachedClient.java:274) at net.spy.memcached.MemcachedClient.set(MemcachedClient.java:631) at de.javakaffee.web.msm.MemcachedBackupSessionManager.storeSessionInMemcached(MemcachedBackupSessionManager.java:721) at de.javakaffee.web.msm.MemcachedBackupSessionManager.backupSession(MemcachedBackupSessionManager.java:495) at de.javakaffee.web.msm.SessionTrackerValve.backupSession(SessionTrackerValve.java:117) at de.javakaffee.web.msm.SessionTrackerValve.invoke(SessionTrackerValve.java:107) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286) at
Re: How to access webapp classes from a Context/Manager implementation (jar located in in $CATALINA_HOME/lib/)
On 10/01/2010 14:35, Martin Grotzke wrote: final XMLFormat? xmlFormat = (XMLFormat?) Class.forName( de.javakaffee.web.msm.serializer.javolution.JodaDateTimeFormat, true, classLoader ).newInstance(); snip/ Can someone help with this? I suggest downloading a copy of the Tomcat source code and debugging your way through the call above. The first thing I'd check is whether classLoader is what you expect it to be and it if is, I'd then see what is going on in that call as it should find the class. Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: How to access webapp classes from a Context/Manager implementation (jar located in in $CATALINA_HOME/lib/)
2010/1/10 Martin Grotzke martin.grot...@javakaffee.de: Hi, Jan 10, 2010 2:57:51 PM org.apache.catalina.connector.CoyoteAdapter service SEVERE: An exception or error occurred in the container during the request processing java.lang.NoClassDefFoundError: org/joda/time/format/ISODateTimeFormat at de.javakaffee.web.msm.serializer.javolution.JodaDateTimeFormat.clinit(JodaDateTimeFormat.java:35) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:247) So, JodaDateTimeFormat was found and its clinit was called, but ISODateTimeFormat was not. Where have you placed your joda jar? Also please read http://tomcat.apache.org/tomcat-6.0-doc/class-loader-howto.html Best regards, Konstantin Kolinko - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: How to access webapp classes from a Context/Manager implementation (jar located in in $CATALINA_HOME/lib/)
On Mon, 2010-01-11 at 02:54 +0300, Konstantin Kolinko wrote: 2010/1/10 Martin Grotzke martin.grot...@javakaffee.de: Hi, Jan 10, 2010 2:57:51 PM org.apache.catalina.connector.CoyoteAdapter service SEVERE: An exception or error occurred in the container during the request processing java.lang.NoClassDefFoundError: org/joda/time/format/ISODateTimeFormat at de.javakaffee.web.msm.serializer.javolution.JodaDateTimeFormat.clinit(JodaDateTimeFormat.java:35) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:247) So, JodaDateTimeFormat was found and its clinit was called, but ISODateTimeFormat was not. JodaDateTimeFormat is the joda DateTime serializer shipped with the memcached-session-manager (msm), which should be used/activated if joda is available in the webapp classpath. ISODateTimeFormat is a class provided by joda. Where have you placed your joda jar? The joda jar is placed in WEB-INF/lib of the application. I don't want to have this in $CATALINA_HOME/lib as joda serialization shall only be supported if it's required by the webapp. The JodaDateTimeFormat comes with the msm jar located in tomcat's lib. Also please read http://tomcat.apache.org/tomcat-6.0-doc/class-loader-howto.html I've already done that, but I didn't find the information to solve this issue. Also reading again didn't help ;-) Thanx cheers, Martin Best regards, Konstantin Kolinko - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org signature.asc Description: This is a digitally signed message part
Re: How to deploy java app. on Tomcat's virtual domains residing outside CATALINA_HOME?
Thank you guys, I've decided to install it into CATALINA_HOME since it seems to be the only proper way for now of installing Sakai. I also would like to keep apache http and use it's ssl capabilities. Leon On Sun, Jan 10, 2010 at 7:57 AM, Christopher Schultz ch...@christopherschultz.net wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Leon, On 1/9/2010 9:38 AM, Leon Kolchinsky wrote: Yes instructions for Sakai actually say expand it into CATALINA_HOME. What are the top-level contents for the Sakai tarball? Is it a single directory? I would expect http://source.sakaiproject.org/release/2.6.1/artifacts/sakai-bin-2.6.1.tgz to expand to either a sakai-2.6.1 directory or maybe even webapps/sakai-2.6.1 or something like that. If you want to deploy Sakai onto your myserver029.somedomain.com virtual host, then you need to put the Sakai directory into one of two places: /srv/myserver029/Sakai (for http://myserver029.somedomain.com/Sakai) or /srv/myserver029/ROOT (for http://myserver029.somedomain.com/) You should also remove the Context elements from your conf/server.xml: they will cause nothing but confusion. O.K I may be wrong but http://sakai26.dyndns.org/servlets-examples/ is working. That's because you properly deployed them using these commands: cp -R /opt/tomcat/webapps/jsp-examples /srv/myserver029/ cp -R /opt/tomcat/webapps/servlets-examples /srv/sakai26/ I'd like to fix my configuration and I'm opened for suggestions. What should I change in my configs (I think that I gave a full configs and changes I've made to defaults)? Suggestions: 1. Remove the ApacheConfig Listener (as Mark already suggested) 2. Remove Context elements from conf/server.xml 3. Put Sakai into /srv/myserver029/Sakai or /srv/myserver029/ROOT (or /srv/sakai26/Sakai or /srv/sakai26/ROOT) 4. Eliminate Apache httpd: you're passing-through everything to Tomcat anyway I don't have an access to my linux server now but I've downloaded to J: drive on my win. machine it and there is a structure of tar.gz: [snip] J:\webapps\ access.war authn.war courier.war dav.war direct.war emailtemplateservice-tool.war library.war mailtool.war mercury.war osp-common-tool.war osp-glossary-tool.war osp-jsf-example.war osp-jsf-resource.war osp-matrix-tool.war osp-portal-tool.war osp-portal.war osp-presentation-tool.war osp-wizard-tool.war podcasts.war portal-render.war portal.war providers.war sakai-alias-tool.war sakai-announcement-tool.war sakai-archive-tool.war sakai-assignment-tool.war sakai-authz-tool.war sakai-axis.war sakai-axis2.war sakai-blogger-tool.war sakai-calendar-summary-tool.war sakai-calendar-tool.war sakai-chat-tool.war sakai-citations-tool.war sakai-content-tool.war sakai-fck-connector.war sakai-gradebook-testservice.war sakai-gradebook-tool.war sakai-help-tool.war sakai-jsf-resource.war sakai-login-tool.war sakai-mailarchive-james.war sakai-mailarchive-tool.war sakai-memory-tool.war sakai-message-tool.war sakai-messageforums-tool.war sakai-metaobj-tool.war sakai-news-tool.war sakai-podcasts.war sakai-poll-tool.war sakai-postem-tool.war sakai-presence-tool.war sakai-presentation-tool.war sakai-profile-tool.war sakai-reports-tool.war sakai-reset-pass.war sakai-rights-tool.war sakai-roster-tool.war sakai-rutgers-linktool.war sakai-rwiki-tool.war sakai-sample-tool-jsf.war sakai-sample-tool-servlet.war sakai-scheduler-tool.war sakai-search-tool.war sakai-sections-tool.war sakai-site-manage-group-helper.war sakai-site-manage-group-section-role-helper.war sakai-site-manage-participant-helper.war sakai-site-manage-tool.war sakai-site-pageorder-helper.war sakai-site-tool.war sakai-syllabus-tool.war sakai-tool-tool-su.war sakai-user-tool-admin-prefs.war sakai-user-tool-prefs.war sakai-user-tool.war sakai-usermembership-tool.war sakai-web-tool.war samigo.war savecite.war tool.war web.war wiki.war xsl-portal.war OMG Sakai is deploying 84 webapps into your container. :( I recommend contacting the Sakai community for instructions for how to deploy their application in ways other than their default binary installation procedure. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEUEARECAAYFAktI7aUACgkQ9CaO5/Lv0PDB3ACdEyRsol3SeRFbvdSUCpqd0zFv 1V8Al0T+9q5LkXlCYuiy1L1IOsJW/v0= =7UdY -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: How to deploy java app. on Tomcat's virtual domains residing outside CATALINA_HOME?
From: Leon Kolchinsky [mailto:lkolc...@gmail.com] Subject: Re: How to deploy java app. on Tomcat's virtual domains residing outside CATALINA_HOME? I also would like to keep apache http and use it's ssl capabilities. The identical SSL capabilities (same code) are available in Tomcat's APR connector, which would be easier to configure, administer, and maintain than Tomcat + httpd. http://tomcat.apache.org/tomcat-6.0-doc/apr.html - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: How to access webapp classes from a Context/Manager implementation (jar located in in $CATALINA_HOME/lib/)
2010/1/11 Martin Grotzke martin.grot...@javakaffee.de: On Mon, 2010-01-11 at 02:54 +0300, Konstantin Kolinko wrote: 2010/1/10 Martin Grotzke martin.grot...@javakaffee.de: Hi, Jan 10, 2010 2:57:51 PM org.apache.catalina.connector.CoyoteAdapter service SEVERE: An exception or error occurred in the container during the request processing java.lang.NoClassDefFoundError: org/joda/time/format/ISODateTimeFormat at de.javakaffee.web.msm.serializer.javolution.JodaDateTimeFormat.clinit(JodaDateTimeFormat.java:35) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:247) So, JodaDateTimeFormat was found and its clinit was called, but ISODateTimeFormat was not. JodaDateTimeFormat is the joda DateTime serializer shipped with the memcached-session-manager (msm), which should be used/activated if joda is available in the webapp classpath. ISODateTimeFormat is a class provided by joda. Where have you placed your joda jar? The joda jar is placed in WEB-INF/lib of the application. I don't want to have this in $CATALINA_HOME/lib as joda serialization shall only be supported if it's required by the webapp. The JodaDateTimeFormat comes with the msm jar located in tomcat's lib. That won't work. A class loaded from Common classloader cannot depend on classes that are in the Webapp classloader. Place them in the same place: either both in WEB-INF/lib, or both in $CATALINA_HOME/lib You may learn how java.lang.Class.forName() is called by the VM to load dependent classes, but there is a simple concern, that should be understandable: - when a web application is stopped (undeployed), all its assets have to be removed from memory. - webapp classloader belongs to the application, and takes some steps to destroy itself, when the application is stopped - classloader knows, what classes it has already loaded When JodaDateTimeFormat class belongs to the Common classloader, it will be loaded in memory as long as Tomcat is running, and thus cannot depend on classes in the Webapp which are relatively short-lived. Implementation-wise that is class loader delegation model. The Webapp classloader is not a parent of the Common one. Also please read http://tomcat.apache.org/tomcat-6.0-doc/class-loader-howto.html I've already done that, but I didn't find the information to solve this issue. Also reading again didn't help ;-) Thanx cheers, Martin Best regards, Konstantin Kolinko - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: How to deploy java app. on Tomcat's virtual domains residing outside CATALINA_HOME?
On 09/01/2010 06:25, Leon Kolchinsky wrote: Hello All, I've installed Apache httpd +mod_jk and tomcat with multiple virtual hosts Used primarily those 2 manuals http://www.alwayssunny.com/blog/?p=174 This one looks pretty good although I wouldn't use the ApacheConfig listener. http://www.howtoforge.com/apache2_tomcat5_mod_jk_p2 I'd ignore this one. Now I need to deply java application called Sakai (http://source.sakaiproject.org/release/2.6.1/artifacts/sakai-bin-2.6.1.tgz) That is a 280MB download so it would help if you told us what was in it. They all talking about downloading the archive into $CATALINA_HOME and then unpacking the archive. Then start up Tomcat - http://confluence.sakaiproject.org/display/DOC/Install+Guide+-+Binary+Install+(2.6) When I extract sakai-bin-2.6.1.tgz into /srv/myserver029 (Vitual domain's DocumentRoot) and restart tomcat and apache I'm getting - HTTP Status 404 - / CATALINA_HOME != httpd document root I'm not surprised it didn't work. Here are some of my configs realted to apache httpd+tomcat+virt domains integration: You are using the same location for httpd document root and Host appBase and web application's docBase. That is never going to work. appBase must *never* be the same as docBase. I suggest you read this: http://tomcat.apache.org/tomcat-6.0-doc/virtual-hosting-howto.html I strongly recommend that http DocumentRoot is never the same as a web applications docBase. You have to be very carefully do to create a whole bunch of security issues. It is much easier just not to do this. I suggest you follow the Tomcat virtual hosting how-to and get that working with Sakai and then worry about adding httpd to the mix. Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: How to deploy java app. on Tomcat's virtual domains residing outside CATALINA_HOME?
Hello Mark, Thanks for the link - http://tomcat.apache.org/tomcat-6.0-doc/virtual-hosting-howto.html I don't think that you've read my configs well. CATALINA_HOME != httpd document root That's my case! Where did you got the info that it isn't so? appBase and docBase are also different! And virt. hosts are actually working (please read what I've written). It must be something with Configuring my Contexts as per manual. My appBase is also not under CATALINA_HOME. Sakai is similar to moodle in some way. I'm sorry that it's 250M but I didn't write it. I've been asked to install it on virt. domains Any help please? On Sat, Jan 9, 2010 at 10:46 PM, Mark Thomas ma...@apache.org wrote: On 09/01/2010 06:25, Leon Kolchinsky wrote: Hello All, I've installed Apache httpd +mod_jk and tomcat with multiple virtual hosts Used primarily those 2 manuals http://www.alwayssunny.com/blog/?p=174 This one looks pretty good although I wouldn't use the ApacheConfig listener. http://www.howtoforge.com/apache2_tomcat5_mod_jk_p2 I'd ignore this one. Now I need to deply java application called Sakai (http://source.sakaiproject.org/release/2.6.1/artifacts/sakai-bin-2.6.1.tgz) That is a 280MB download so it would help if you told us what was in it. They all talking about downloading the archive into $CATALINA_HOME and then unpacking the archive. Then start up Tomcat - http://confluence.sakaiproject.org/display/DOC/Install+Guide+-+Binary+Install+(2.6) When I extract sakai-bin-2.6.1.tgz into /srv/myserver029 (Vitual domain's DocumentRoot) and restart tomcat and apache I'm getting - HTTP Status 404 - / CATALINA_HOME != httpd document root I'm not surprised it didn't work. Here are some of my configs realted to apache httpd+tomcat+virt domains integration: You are using the same location for httpd document root and Host appBase and web application's docBase. That is never going to work. appBase must *never* be the same as docBase. I suggest you read this: http://tomcat.apache.org/tomcat-6.0-doc/virtual-hosting-howto.html I strongly recommend that http DocumentRoot is never the same as a web applications docBase. You have to be very carefully do to create a whole bunch of security issues. It is much easier just not to do this. I suggest you follow the Tomcat virtual hosting how-to and get that working with Sakai and then worry about adding httpd to the mix. Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: How to deploy java app. on Tomcat's virtual domains residing outside CATALINA_HOME?
On 09/01/2010 13:42, Leon Kolchinsky wrote: Hello Mark, Thanks for the link - http://tomcat.apache.org/tomcat-6.0-doc/virtual-hosting-howto.html I don't think that you've read my configs well. CATALINA_HOME != httpd document root That's my case! I meant that CATALINA_HOME is not the same as httpd's document root. If the instructions for Sakai say expand it into CATALINA_HOME then you can't expect it to work if you expand it somewhere else. Where did you got the info that it isn't so? Your configuration files. From your httpd.conf: DocumentRoot /srv/myserver029 From your server.xml appBase=/srv/myserver029 appBase and docBase are also different! No they are not. Again, from your server.xml appBase=/srv/sakai26 docBase= docBase is relative to appBase so if docBase= then docBase==appBase And virt. hosts are actually working (please read what I've written). They might look like they are working but I assure you that they are badly broken. It must be something with Configuring my Contexts as per manual. Nope. The problem is your broken configuration. My appBase is also not under CATALINA_HOME. I know. I read your configuration files. That is not an issue for virtual hosting although it may be a problem for the Sakai installation process. Again, if you tell us the structure of that tar.gz we might be able to help. Any help please? See my previous mail. If you choose to ignore the help you are given, then there isn't much point in folks here trying to help you. Mark On Sat, Jan 9, 2010 at 10:46 PM, Mark Thomas ma...@apache.org wrote: On 09/01/2010 06:25, Leon Kolchinsky wrote: Hello All, I've installed Apache httpd +mod_jk and tomcat with multiple virtual hosts Used primarily those 2 manuals http://www.alwayssunny.com/blog/?p=174 This one looks pretty good although I wouldn't use the ApacheConfig listener. http://www.howtoforge.com/apache2_tomcat5_mod_jk_p2 I'd ignore this one. Now I need to deply java application called Sakai (http://source.sakaiproject.org/release/2.6.1/artifacts/sakai-bin-2.6.1.tgz) That is a 280MB download so it would help if you told us what was in it. They all talking about downloading the archive into $CATALINA_HOME and then unpacking the archive. Then start up Tomcat - http://confluence.sakaiproject.org/display/DOC/Install+Guide+-+Binary+Install+(2.6) When I extract sakai-bin-2.6.1.tgz into /srv/myserver029 (Vitual domain's DocumentRoot) and restart tomcat and apache I'm getting - HTTP Status 404 - / CATALINA_HOME != httpd document root I'm not surprised it didn't work. Here are some of my configs realted to apache httpd+tomcat+virt domains integration: You are using the same location for httpd document root and Host appBase and web application's docBase. That is never going to work. appBase must *never* be the same as docBase. I suggest you read this: http://tomcat.apache.org/tomcat-6.0-doc/virtual-hosting-howto.html I strongly recommend that http DocumentRoot is never the same as a web applications docBase. You have to be very carefully do to create a whole bunch of security issues. It is much easier just not to do this. I suggest you follow the Tomcat virtual hosting how-to and get that working with Sakai and then worry about adding httpd to the mix. Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: How to deploy java app. on Tomcat's virtual domains residing outside CATALINA_HOME?
Hello again, Yes instructions for Sakai actually say expand it into CATALINA_HOME. O.K I may be wrong but http://sakai26.dyndns.org/servlets-examples/ is working. I'd like to fix my configuration and I'm opened for suggestions. What should I change in my configs (I think that I gave a full configs and changes I've made to defaults)? I don't have an access to my linux server now but I've downloaded to J: drive on my win. machine it and there is a structure of tar.gz: J:\ common\ components\ licenses\ server\ shared\ webapps\ J:\common\ lib\ J:\common\lib\ commons-logging-1.0.4.jar log4j-1.2.12.jar sakai-dav-common-2.6.1.jar sakai-kernel-common-1.0.12.jar J:\components\ emailtemplateservice-pack\ entitybroker-pack\ localization-bundles-pack\ osp-common-component\ osp-glossary-component\ osp-integration-component\ osp-matrix-component\ osp-portal-component\ osp-presentation-component\ osp-warehouse-component\ osp-wizard-components\ sakai-announcement-pack\ sakai-archive-pack\ sakai-assignment-pack\ sakai-calendar-pack\ sakai-chat-pack\ sakai-citations-pack\ sakai-common-components\ sakai-comp-help\ sakai-comp-scheduler\ sakai-content-providers-pack\ sakai-courier-pack\ sakai-coursemanagement-hibernate-pack\ sakai-gradebook-service-pack\ sakai-gradebooksample-grade-converter\ sakai-import\ sakai-kernel-component\ sakai-mailarchive-pack\ sakai-messageforums-components\ sakai-metaobj-component\ sakai-news-pack\ sakai-podcasts-pack\ sakai-poll-pack\ sakai-portal-render-pack\ sakai-portal-service-pack\ sakai-postem-pack\ sakai-presence-pack\ sakai-presentation-pack\ sakai-privacy-pack\ sakai-profile-components\ sakai-provider-pack\ sakai-reports-components\ sakai-rights-pack\ sakai-roster-components\ sakai-rwiki-pack\ sakai-samigo-pack\ sakai-sample-impl-access-pack\ sakai-search-adapters-pack\ sakai-search-pack\ sakai-sections-pack\ sakai-site-manage-pack\ sakai-syllabus-pack\ sakai-taggable-pack\ sakai-usermembership-pack\ sakai-warehouse-component\ sakai-web-pack\ J:\components\emailtemplateservice-pack\ META-INF\ WEB-INF\ J:\components\emailtemplateservice-pack\META-INF\ maven\ MANIFEST.MF J:\components\emailtemplateservice-pack\META-INF\maven\ org.sakaiproject.emailtemplateservice\ J:\components\emailtemplateservice-pack\META-INF\maven\org.sakaiproject.emailtemplateservice\ emailtemplateservice-pack\ J:\components\emailtemplateservice-pack\META-INF\maven\org.sakaiproject.emailtemplateservice\emailtemplateservice-pack\ pom.properties pom.xml J:\components\emailtemplateservice-pack\WEB-INF\ lib\ components.xml hibernate-hbms.xml spring-hibernate.xml web.xml J:\components\emailtemplateservice-pack\WEB-INF\lib\ commons-codec-1.3.jar easymock-1.2_Java1.3.jar emailtemplateservice-impl-0.3.1.jar freemarker-2.3.11.jar generic-dao-0.9.8.jar J:\components\entitybroker-pack\ META-INF\ WEB-INF\ J:\components\entitybroker-pack\META-INF\ maven\ MANIFEST.MF J:\components\entitybroker-pack\META-INF\maven\ org.sakaiproject.entitybroker\ J:\components\entitybroker-pack\META-INF\maven\org.sakaiproject.entitybroker\ entitybroker-pack\ J:\components\entitybroker-pack\META-INF\maven\org.sakaiproject.entitybroker\entitybroker-pack\ pom.properties pom.xml J:\components\entitybroker-pack\WEB-INF\ lib\ components.xml spring-jdbc.xml web.xml J:\components\entitybroker-pack\WEB-INF\lib\ commons-codec-1.2.jar commons-httpclient-3.1.jar entitybroker-impl-1.3.6.1.jar entitybroker-utils-1.3.6.1.jar generic-dao-0.9.12.jar reflectutils-0.9.11.jar sakai-kernel-util-1.0.12.jar J:\components\localization-bundles-pack\ META-INF\ WEB-INF\ J:\components\localization-bundles-pack\META-INF\ maven\ MANIFEST.MF J:\components\localization-bundles-pack\META-INF\maven\ org.sakaiproject\ J:\components\localization-bundles-pack\META-INF\maven\org.sakaiproject\ localization-bundles-pack\ J:\components\localization-bundles-pack\META-INF\maven\org.sakaiproject\localization-bundles-pack\ pom.properties pom.xml J:\components\localization-bundles-pack\WEB-INF\ lib\ components.xml web.xml J:\components\localization-bundles-pack\WEB-INF\lib\ localization-bundles-2.6.1.jar J:\components\osp-common-component\ META-INF\ WEB-INF\ J:\components\osp-common-component\META-INF\ maven\ MANIFEST.MF J:\components\osp-common-component\META-INF\maven\ org.sakaiproject.osp\ J:\components\osp-common-component\META-INF\maven\org.sakaiproject.osp\ osp-common-component\ J:\components\osp-common-component\META-INF\maven\org.sakaiproject.osp\osp-common-component\ pom.properties pom.xml J:\components\osp-common-component\WEB-INF\ lib\ components.xml web.xml J:\components\osp-common-component\WEB-INF\lib\ commons-beanutils-1.7.0.jar commons-codec-1.2.jar commons-digester-1.6.jar jsf-api-1.1.01.jar jsf-impl-1.1.01.jar osp-common-impl-2.6.1.jar sakai-kernel-util-1.0.12.jar sakai-metaobj-impl-2.6.1.jar sakai-metaobj-tool-lib-2.6.1.jar standard-1.1.2.jar velocity-1.3.1.jar J:\components\osp-glossary-component\ META-INF
Re: How to deploy java app. on Tomcat's virtual domains residing outside CATALINA_HOME?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Leon, On 1/9/2010 9:38 AM, Leon Kolchinsky wrote: Yes instructions for Sakai actually say expand it into CATALINA_HOME. What are the top-level contents for the Sakai tarball? Is it a single directory? I would expect http://source.sakaiproject.org/release/2.6.1/artifacts/sakai-bin-2.6.1.tgz to expand to either a sakai-2.6.1 directory or maybe even webapps/sakai-2.6.1 or something like that. If you want to deploy Sakai onto your myserver029.somedomain.com virtual host, then you need to put the Sakai directory into one of two places: /srv/myserver029/Sakai (for http://myserver029.somedomain.com/Sakai) or /srv/myserver029/ROOT (for http://myserver029.somedomain.com/) You should also remove the Context elements from your conf/server.xml: they will cause nothing but confusion. O.K I may be wrong but http://sakai26.dyndns.org/servlets-examples/ is working. That's because you properly deployed them using these commands: cp -R /opt/tomcat/webapps/jsp-examples /srv/myserver029/ cp -R /opt/tomcat/webapps/servlets-examples /srv/sakai26/ I'd like to fix my configuration and I'm opened for suggestions. What should I change in my configs (I think that I gave a full configs and changes I've made to defaults)? Suggestions: 1. Remove the ApacheConfig Listener (as Mark already suggested) 2. Remove Context elements from conf/server.xml 3. Put Sakai into /srv/myserver029/Sakai or /srv/myserver029/ROOT (or /srv/sakai26/Sakai or /srv/sakai26/ROOT) 4. Eliminate Apache httpd: you're passing-through everything to Tomcat anyway I don't have an access to my linux server now but I've downloaded to J: drive on my win. machine it and there is a structure of tar.gz: [snip] J:\webapps\ access.war authn.war courier.war dav.war direct.war emailtemplateservice-tool.war library.war mailtool.war mercury.war osp-common-tool.war osp-glossary-tool.war osp-jsf-example.war osp-jsf-resource.war osp-matrix-tool.war osp-portal-tool.war osp-portal.war osp-presentation-tool.war osp-wizard-tool.war podcasts.war portal-render.war portal.war providers.war sakai-alias-tool.war sakai-announcement-tool.war sakai-archive-tool.war sakai-assignment-tool.war sakai-authz-tool.war sakai-axis.war sakai-axis2.war sakai-blogger-tool.war sakai-calendar-summary-tool.war sakai-calendar-tool.war sakai-chat-tool.war sakai-citations-tool.war sakai-content-tool.war sakai-fck-connector.war sakai-gradebook-testservice.war sakai-gradebook-tool.war sakai-help-tool.war sakai-jsf-resource.war sakai-login-tool.war sakai-mailarchive-james.war sakai-mailarchive-tool.war sakai-memory-tool.war sakai-message-tool.war sakai-messageforums-tool.war sakai-metaobj-tool.war sakai-news-tool.war sakai-podcasts.war sakai-poll-tool.war sakai-postem-tool.war sakai-presence-tool.war sakai-presentation-tool.war sakai-profile-tool.war sakai-reports-tool.war sakai-reset-pass.war sakai-rights-tool.war sakai-roster-tool.war sakai-rutgers-linktool.war sakai-rwiki-tool.war sakai-sample-tool-jsf.war sakai-sample-tool-servlet.war sakai-scheduler-tool.war sakai-search-tool.war sakai-sections-tool.war sakai-site-manage-group-helper.war sakai-site-manage-group-section-role-helper.war sakai-site-manage-participant-helper.war sakai-site-manage-tool.war sakai-site-pageorder-helper.war sakai-site-tool.war sakai-syllabus-tool.war sakai-tool-tool-su.war sakai-user-tool-admin-prefs.war sakai-user-tool-prefs.war sakai-user-tool.war sakai-usermembership-tool.war sakai-web-tool.war samigo.war savecite.war tool.war web.war wiki.war xsl-portal.war OMG Sakai is deploying 84 webapps into your container. :( I recommend contacting the Sakai community for instructions for how to deploy their application in ways other than their default binary installation procedure. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEUEARECAAYFAktI7aUACgkQ9CaO5/Lv0PDB3ACdEyRsol3SeRFbvdSUCpqd0zFv 1V8Al0T+9q5LkXlCYuiy1L1IOsJW/v0= =7UdY -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
How to deploy java app. on Tomcat's virtual domains residing outside CATALINA_HOME?
Hello All, I've installed Apache httpd +mod_jk and tomcat with multiple virtual hosts Used primarily those 2 manuals http://www.alwayssunny.com/blog/?p=174 http://www.howtoforge.com/apache2_tomcat5_mod_jk_p2 and a lot of reading through apache docs. The virt. domains working and java requests processed by tomcat through apache httpd. Now I need to deply java application called Sakai (http://source.sakaiproject.org/release/2.6.1/artifacts/sakai-bin-2.6.1.tgz) in DocumentRoot of one of my virtual domains. I can't find any documentation on deploying Sakai in similar environment :( They all talking about downloading the archive into $CATALINA_HOME and then unpacking the archive. Then start up Tomcat - http://confluence.sakaiproject.org/display/DOC/Install+Guide+-+Binary+Install+(2.6) When I extract sakai-bin-2.6.1.tgz into /srv/myserver029 (Vitual domain's DocumentRoot) and restart tomcat and apache I'm getting - HTTP Status 404 - / type Status report message / description The requested resource (/) is not available. Apache Tomcat/5.5.26 Which probably means that the app. is not deployed. Can someone tell me how to install and configure Sakai or any other similar application in virt. domain ? There must be some WEB_INF/web.xml config I should use? May be some parameters in the main server.xml file? Thanks. Here are some of my configs realted to apache httpd+tomcat+virt domains integration: # cat /etc/httpd/conf/workers.properties: # # This file provides minimal jk configuration properties needed to # connect to Tomcat. # # We define a workers named worker1 and worker2 for 2 different virt. domains workers.tomcat_home=/opt/tomcat/ workers.java_home=/usr/java/jdk ps=/ worker.list=worker1,worker2 worker.worker1.type=ajp13 worker.worker1.host=myserver029.somedomain.com worker.worker1.port=8009 worker.worker1.lbfactor=1 worker.worker2.type=ajp13 worker.worker2.host=sakai26.dyndns.org worker.worker2.port=8009 worker.worker2.lbfactor=1 # Load-balancing behaviour worker.loadbalancer.type=lb # Status worker for managing load balancer worker.status.type=status Snap from httpd.conf: LoadModule jk_module modules/mod_jk.so # mod_jk config # Where to find workers.properties # Update this path to match your conf directory location (put workers.properties next to httpd.conf) JkWorkersFile /etc/httpd/conf/workers.properties # Where to put jk shared memory # Update this path to match your local state directory or logs directory JkShmFile /var/log/httpd/mod_jk.shm # Where to put jk logs # Update this path to match your logs directory location (put mod_jk.log next to access_log) JkLogFile /var/log/httpd/mod_jk.log # Set the jk log level [debug/error/info] JkLogLevel info # Select the timestamp log format JkLogStampFormat [%a %b %d %H:%M:%S %Y] #JkOptions indicate to send SSL KEY SIZE, JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories # JkRequestLogFormat set the request format JkRequestLogFormat %w %V %T # Globally deny access to the WEB-INF directory LocationMatch '.*WEB-INF.*' AllowOverride None deny from all /LocationMatch Virt. hosts configs: VirtualHost *:80 ServerName myserver029.somedomain.com ServerAdmin ad...@somedomain.com DocumentRoot /srv/myserver029 # ServerAlias www.myserver029.somedomain.com # if not specified, the global error log is used ErrorLog /var/log/httpd/myserver029.somedomain.com-error_log CustomLog /var/log/httpd/myserver029.somedomain.com-access_log combined # don't loose time with IP address lookups HostnameLookups Off # needed for named virtual hosts UseCanonicalName Off # Add index.jsp to DirectoryIndex files DirectoryIndex index.php index.html index.htm index.shtml index.php4 index.php3 index.phtml index.cgi index.jsp JkMount /* worker1 JkMount /*.jsp worker1 # Im doing it globally in httpd.conf so no need to do this on domain basis - deny access to the WEB-INF directory # LocationMatch '.*WEB-INF.*' # AllowOverride None # deny from all # /LocationMatch /VirtualHost For my second virtual host, I created the following configuration file under /etc/httpd/conf/vhosts.d/02sakai26.dyndns.org.conf VirtualHost *:80 ServerName sakai26.dyndns.org ServerAdmin ad...@somedomain.com DocumentRoot /srv/sakai26 ServerAlias www.sakai26.dyndns.org # if not specified, the global error log is used ErrorLog /var/log/httpd/sakai26.dyndns.org-error_log CustomLog /var/log/httpd/sakai26.dyndns.org-access_log combined # don't loose time with IP address lookups HostnameLookups Off # needed for named virtual hosts UseCanonicalName Off # Add index.jsp to DirectoryIndex files DirectoryIndex index.php index.html index.htm index.shtml index.php4 index.php3 index.phtml index.cgi index.jsp JkMount /* worker2 JkMount /*.jsp worker2 # Im doing it globally in httpd.conf so no need to do this on domain basis - deny access to the WEB-INF directory # LocationMatch '.*WEB-INF.*' # AllowOverride None # deny from all # /LocationMatch /VirtualHost Configuration of mod_jk listener in tomcat
$CATALINA_HOME
I am trying to do following. (3) Start Up Tomcat (3.1) Tomcat can be started by executing the following commands: $CATALINA_HOME\bin\startup.bat (Windows) When I run above command on cmd prompt , I get message path can not be found. How to find path for $CATALINA_HOME from cmd prompt ? IS running this command on cmd prompt or starting tomcat service from services is same or different ? thanks -- View this message in context: http://www.nabble.com/%24CATALINA_HOME-tp22941742p22941742.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: $CATALINA_HOME
From: jigneshjsoni [mailto:jigneshjs...@gmail.com] Subject: $CATALINA_HOME When I run above command on cmd prompt , I get message path can not be found. How to find path for $CATALINA_HOME from cmd prompt ? Read *all* of RUNNING.txt, including this from 2.2: For the purposes of the remainder of this document, the symbolic name $CATALINA_HOME is used to refer to the full pathname of the release directory. When running Tomcat from the scripts, you typically do so from a command prompt window where your current directory is $CATALINA_HOME\bin, so all you need to enter is startup. IS running this command on cmd prompt or starting tomcat service from services is same or different ? Different. Be aware that if you used the .exe download (one of the many things you haven't bothered to mention), there are no scripts, and Tomcat must be run as a service. If you use the .zip download, you can run Tomcat either as a service or via the scripts. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: TC6 ${CATALINA_HOME}/conf/web.xml Is this the place to constrain the mime type?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Robert, Robert Koberg wrote: On Feb 6, 2009, at 4:45 PM, Christopher Schultz wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Dave, Dave Pawson wrote: Only one aspect of security Rob. As needed I'll look at others later. Can you suggest alternatives to achieve what I want, rather than something else? Instead of using Accept header with a magic content-type, how about sending a custom header with some credentials included? You mean like 'Authorization' ? :) Now /that's/ an idea! ;) - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkmQyucACgkQ9CaO5/Lv0PDzUQCdFvd5MNBneOJZTilPvqWXtscJ VFYAn3j/njV0akviSr+dpF4fk4coC/a0 =8HwK -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org