Re: questions about tomcat 7 executor with rest services
Thanks > On Oct 12, 2015, at 5:01 PM, Mark Thomas <ma...@apache.org> wrote: > > On 12 October 2015 21:26:30 BST, Brian Millett <bmill...@gmail.com> wrote: >> I’m looking for some insight / info into using executor thread pool for >> a tomcat 7 server that handles many REST services. >> Wondering if a large maxThreads in an Executor would have better >> through put than the same maxThreads for a normal connector? > > Nope. Internally the Connector uses an executor. > >> What scenario would encourage the use of an Executor over a normal >> connector? > > Sharing a common thread pool between multiple connectors. Usually when you > want to limit concurrent requests across http and http. > > 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
questions about tomcat 7 executor with rest services
I’m looking for some insight / info into using executor thread pool for a tomcat 7 server that handles many REST services. Wondering if a large maxThreads in an Executor would have better through put than the same maxThreads for a normal connector? What scenario would encourage the use of an Executor over a normal connector? Thanks. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: integrating Apache 2 server and Tomcat
On Fri, 2009-06-26 at 08:59 -0500, Dimitrios Christodoulakis wrote: Hello, I have been struggling for the past couple of weeks to redirect external traffic from the Apache 2 server to Tomcat 5.5 on a godaddy dedicated server. We have created a new domain on the server, which default public path is /home/myadmin/public_html/ when someone points there browser to www.mydomain.com At the same time I have uploaded and deployed the application under usr/java/tomcat-5.5/webapps/mydomain/ As I understand at this time web content is served by the apache server and not Tomcat. What I have been trying to do is to have all pages static and dynamic be served by Tomcat. Godaddy offers limited support unless we buy into their assisted service plan. I followed some steps they initially suggested which involved creating a symbolic link between the default public directory /home/myadmin/public_html/ and the application directory usr/java/tomcat-5.5/webapps/mydomain/ by using the command: ln -s /usr/java/tomcat-5.5/webapps/mydomain/index.html /home/myadmin/public_html With this I hoped all requests from www.mydomain.com going to /home/myadmin/public_html would be automatically redirected to the actual tomcat content starting with the deployed application's index.html page. But unfortunately this does not work. I am always returned the 404 error message. Is there a known or recommended way to resolve this issue? After some searching I believe there are workarounds involving editing the /usr/java/tomcat-5.5/conf/server.xml and the etc/httpd/conf/http.conf files. Would it be possible someone to provide some general steps how to do this? Many thanks for any practical help. Well this is how I do it, your mileage will vary. I use mod_proxy_http with tomcat configured for just a http connector. T I setup a mod_proxy.conf file for the apache and I'll just show how I do it for the tomcat examples. Apache serves the statis html images, the jsp/servlets are fed by tomcat. __BEGIN__ IfModule mod_proxy.c ### # MOD_PROXY CONFIGURATIONS# ### LoadModule proxy_http_module modules/mod_proxy_http.so ProxyRequests Off # Make sure that the virtual host name is passed through to the # backend servlet container for virtual host support. ProxyPreserveHost On # Tell mod_mod proxy that it should not send back the body-content of # error pages, but be fascist and use its local error pages if the # remote HTTP stack is sending an HTTP 4xx or 5xx status code. ProxyErrorOverride On ProxyPassReverse / http://localhost:8080/ Proxy * Order deny,allow Allow from all /Proxy RewriteLog logs/rewrite_log RewriteLogLevel 1 Alias /examples /opt/webBaseDir/webapps/examples LocationMatch /examples LimitExcept POST GET PUT Order Deny,Allow Deny from all Allow from none /LimitExcept # The nastiness begins, let's fire up the rewrite engine RewriteEngine On # Everything ending in .gif, .jpg or .jpeg will be served again # directly by Apache, no need to bother the servlet container. As above # this is the last rule as specified by the [L] flag at the end RewriteRule \.(pl|php|cgi)$ - [PT,L] RewriteRule \.(jpg|jpeg|gif|png|html)$ - [PT,L] # Everything that starts with a NON-CASE-SENSITIVE match (the NC flag) # of /WEB-INF or /WEB-INF/ is forbidden (the F flag). And again, # this is the last rule (the L flag), nothing will be processed by the # rewrite engine if this rule is matched RewriteRule ^.*/WEB-INF/?(.*) - [L,F,NC] # Any jsp, jspx, do, servlet get proxied RewriteRule \.(jsp|jspx|do) http://localhost:8080%{REQUEST_URI}; [P,L] RewriteRule ^/(.*)/servlet/(.*) http://localhost:8080%{REQUEST_URI}; [P,L] /LocationMatch /IfModule __END__ -- Brian Millett - [ Sinclair, Zathras, and Garibaldi, Babylon Squared] S: Why do you need Babylon 5? Z: Zathras tell, you let Zathras go? Finish what Zathras came for? G: Zathras tells maybe we don't break Zathras scrawny little neck. signature.asc Description: This is a digitally signed message part
Re: APR Native library on tomcat 6
On Fri, 2009-06-19 at 02:05 -0700, lmk wrote: --prefix=/usr/tomcat/apache-tomcat-6.0.18 I'd look where you told it to go. -- Brian Millett - [ Sinclair (re: The Line), The Gathering] The sky was full of stars and every star an exploding ship...one of ours. signature.asc Description: This is a digitally signed message part
Re: running tomcat with root user
On Sat, 2009-01-31 at 19:25 -0800, epicwin...@hotmail.com wrote: I have the latest tomcat 6 installed under centos 5.2. The problem I am having is that it appears that I have to run tomcat as root user, because the spring app that tomcat starts needs to write files to other users' home directories. The tomcat user doesn't have access to these directories. I tried making these users part of a shared group, but to complicate the problem the users are jailed using jailkit. So it doesn't appear that jailkit lets me add group write privileges to the home directories and maintain a working jail. Can anyone suggest another alternative? I am not linux user expert so maybe there is an obvious solution i am missing? thanks http://commons.apache.org/daemon/jsvc.html works great, less filling. -- Brian Millett - [ Morden (to Londo), Revelations] The Narns will never be able to prove it was done at your instigation. and, based on your promise to take care of it, your government accepts your responsibility without question or hesitation. Perfect symmetry. I believe that this little demonstration will bring you some very interesting propositions. signature.asc Description: This is a digitally signed message part
Re: jsvc problem with PID
On Sun, 2009-02-01 at 08:20 +, Dave Pawson wrote: Fedora 10, Tomcat 6 Looking to set up a startup/shutdown script based on http://www.mythic-beasts.com/support/tomcat-initscript with paths corrected. Adding debug I'm seeing, in the logs INFO: Jk running ID=0 time=0/27 config=null Feb 1, 2009 7:18:44 AM org.apache.catalina.startup.Catalina start INFO: Server startup in 929 ms 01/02/2009 07:23:58 5575 jsvc.exec error: Cannot open PID file /var/run/jsvc.pid, PID is 5575 01/02/2009 07:23:58 5574 jsvc.exec error: Service exit with a return value of 255 I.e. the PID isn't being written to /var/run/jsvc.pid Any suggestions please? Well, I use the jsvc daemon to start my tomcat on fedora 10. Tomcat 6 your mileage will vary, but here is my start stript. I also use the apr native libs hence the -Djava.library.path=/usr/local/apr/lib and I've also setup monitoring #!/bin/sh # # chkconfig: 345 86 15 # description: Tomcat Server # # Small shell script to show how to start/stop Tomcat using jsvc # If you want to have Tomcat running on port 80 please modify the server.xml # file: # #!-- Define a non-SSL HTTP/1.1 Connector on port 80 -- #Connector className=org.apache.catalina.connector.http.HttpConnector # port=80 minProcessors=5 maxProcessors=75 # enableLookups=true redirectPort=8443 # acceptCount=10 debug=0 connectionTimeout=6/ # # You need a developement version of Tomcat (Apache Tomcat/4.1-dev) # # Adapt the following lines to your configuration JAVA_HOME=/usr/jdk CATALINA_HOME=/opt/tomcat CATALINA_BASE=/opt/webBaseDir DAEMON_HOME=/usr/local/bin TOMCAT_USER=tomcat TMP_DIR=$CATALINA_BASE/temp CATALINA_OPTS= -Djava.library.path=/usr/local/apr/lib -Djava.awt.headless=true -Xms128M -Xmx512M -XX:+UseParallelOldGC -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=9086 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false CLASSPATH=\ $CATALINA_HOME/bin/commons-daemon.jar:\ $CATALINA_HOME/bin/tomcat-juli.jar:\ $CATALINA_HOME/bin/bootstrap.jar case $1 in start) # # Start Tomcat # $DAEMON_HOME/jsvc \ -user $TOMCAT_USER \ -home $JAVA_HOME \ -jvm server \ -Dcatalina.home=$CATALINA_HOME \ -Dcatalina.base=$CATALINA_BASE \ -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager \ -Djava.util.logging.config.file= $CATALINA_BASE/conf/logging.properties \ -Djava.endorsed.dirs=$CATALINA_BASE/endorsed \ -Djava.io.tmpdir=$TMP_DIR \ -outfile $CATALINA_BASE/logs/catalina.out \ -errfile '1' \ $CATALINA_OPTS \ -cp $CLASSPATH \ org.apache.catalina.startup.Bootstrap # # To get a verbose JVM #-verbose \ # To get a debug of jsvc. #-debug \ ;; stop) # # Stop Tomcat # PID=`cat /var/run/jsvc.pid` kill $PID ;; *) echo Usage tomcat.sh start/stop exit 1 ;; esac -- Brian Millett - [ Londo and Sinclair, A Voice in the Wilderness I] If the Narns all stood together in one place and hated all at the same time, that hatred could fly across dozens of light years and reduce Centauri Prime to a ball of ash. That's how much they hate *us*. 'You don't have to respond in kind.' Of course we do. It is a natural law. Physics tells us that for every action, there must be an equal and opposite reaction. They hate us, we hate them, they hate us back and so, here we are, victims of mathematics. signature.asc Description: This is a digitally signed message part
Re: Running Tomcat as Standalone in linux
Chris Baty escribío: Hi guys, I want to serve a site with few graphics so I decided to use Tomcat 5.5 as my server. But I'm having difficulty getting it to run on port 80. I read http://www.ibm.com/developerworks/java/library/l-secjav.html and decided to try xinetd. I added this to /etc/xinetd/: # Redirects any port 80 requests to port 8180 (to Tomcat) service tomcat { socket_type= stream protocol= tcp user= root wait= no port= 80 redirect= localhost 8180 disable= no } it works great on that machine if I point my browser but remotely I get zilch. I've tried plugging in my ip address instead of localhost: zilch. Could anyone point me in the right direction? Thanks. Chris Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ You can also use the java service launcher that is located in the bin directory of the distribution. You need to compile it and install it. What it does is launch tomcat on port 80 as root, but changes the owner to be something else, like 'tomcat'. That way, you can run it on port 80, but not as root. A way of launching it from say /etc/init.d is with a script like the following: #!/bin/sh # # chkconfig: 345 86 15 # description: Tomcat Server # # Small shell script to show how to start/stop Tomcat using jsvc # If you want to have Tomcat running on port 80 please modify the server.xml # file: # #!-- Define a non-SSL HTTP/1.1 Connector on port 80 -- #Connector className=org.apache.catalina.connector.http.HttpConnector # port=80 minProcessors=5 maxProcessors=75 # enableLookups=true redirectPort=8443 # acceptCount=10 debug=0 connectionTimeout=6/ # # # Adapt the following lines to your configuration JAVA_HOME=/usr/jdk CATALINA_HOME=/opt/tomcat CATALINA_BASE=/opt/webBaseDir DAEMON_HOME=/usr/local/bin TOMCAT_USER=tomcat TMP_DIR=$CATALINA_BASE/temp CATALINA_OPTS= -Djava.library.path=/usr/local/apr/lib -Djava.awt.headless=true -Xms128M -Xmx512M -XX:+UseParallelOldGC CLASSPATH=\ $CATALINA_HOME/bin/commons-daemon.jar:\ $CATALINA_HOME/bin/tomcat-juli.jar:\ $CATALINA_HOME/bin/bootstrap.jar case $1 in start) # # Start Tomcat # $DAEMON_HOME/jsvc \ -user $TOMCAT_USER \ -home $JAVA_HOME \ -jvm server \ -Dcatalina.home=$CATALINA_HOME \ -Dcatalina.base=$CATALINA_BASE \ -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager \ -Djava.util.logging.config.file=$CATALINA_BASE/conf/logging.properties \ -Djava.endorsed.dirs=$CATALINA_BASE/endorsed \ -Djava.io.tmpdir=$TMP_DIR \ -outfile $CATALINA_BASE/logs/catalina.out \ -errfile '1' \ $CATALINA_OPTS \ -cp $CLASSPATH \ org.apache.catalina.startup.Bootstrap # # To get a verbose JVM #-verbose \ # To get a debug of jsvc. #-debug \ ;; stop) # # Stop Tomcat # PID=`cat /var/run/jsvc.pid` kill $PID ;; *) echo Usage tomcat.sh start/stop exit 1 ;; esac -- Brian Millett - [ Ivanova, The Geometry of Shadows] If it gets too bad I'll just gnaw it off at the ankle. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat 6.0 with Apache 2.2 front-end
Filip Hanik - Dev Lists escribío: using mod_proxy_http, you want to enable ProxyPreserveHost On Filip loknor wrote: Filip Hanik - Dev Lists wrote: three options mod_proxy_http mod_jk mod_proxy_ajp Filip Yep just found the other option, and a site that got me up to speed very quickly. I can now communicate between Apache and Tomcat. http://blog.taragana.com/index.php/archive/5-steps-to-integrate-tomcat-55-with-apache-20 Thanks, Brent I'd also recommend that you compile the apr native libs for tomcat (apache-tomcat-6.0.14/bin/tomcat-native.tar.gz) and enable it when you start tomcat by adding -Djava.library.path=/usr/local/apr/lib (I installed the lib in /usr/local/apr/lib). What gives you is the apr interface for handling the http connects. from the catalina.out: Nov 26, 2007 9:31:10 AM org.apache.coyote.http11.Http11AprProtocol init INFO: Initializing Coyote HTTP/1.1 on http-8080 This handler scales and is quicker than the java handler. JBoss calls it JBossWeb. See http://labs.jboss.com/jbossweb/index.html for a nice graph of the performance differences between the native apr java handlers. -- Brian Millett - [ Ivanova, The Geometry of Shadows] If it gets too bad I'll just gnaw it off at the ankle. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat 6 and tomcat native
Alec Bickerton escribío: I've been looking at tomcat 6 and have seen a notification that my tc-native was out of date. 07.09.2007 13:06:05 org.apache.catalina.core.AprLifecycleListener init INFO: An older version 1.1.9 of the Apache Tomcat Native library is installed, while Tomcat recommends version greater then 1.1.10 ... Normal startup follows My question is, where do I find this mythical beast? The latest version on http://tomcat.apache.org/tomcat-5.5-doc/apr.html is the version I'm using 1.1.9. Go to: http://tomcat.apache.org/download-connectors.cgi Then select browse download area Then go into the native folder. -- Brian Millett - [ Sheridan and G'Kar, Soul Mates] People seem to be implying that I shouldn't get too comfortable. 'Oh nonsense. It's not as if anyone expects you to...oh...vanish overnight under mysterious circumstances to a strange Minbari post. Why that would be unprecedented in this station's history.' - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Apache HTTP Server - Tomcat and PHP
Munna Dee escribío: Hi all, I have one question regarding running Apache HTTP Server to run/serve Servlets as well as PHP content. I have installed the following: 1. Apache 2.2.4 (Win32) HTTP Server 2. Apache-Tomcat 6.0.13 Servlet container and 3. PHP 5.2.3 I have configured Apache HTTP Server to load PHP module and now I need to connect Apache HTTP Server and Tomcat together to also serve servlet requests in same system/server. I have gone through 'mod_jk' solution for this. But, I was wondering are there any other ways to do this - Working Apache HTTP Server with PHP along with Tomcat. Is it that I can run Apache HTTP Server on same(i.e on its own) port and run Tomcat on different port to get it done? Can anybody please tell your expert opinions on this? Thanks! Running 3 instances of tomcat with http connectors on ports 8080 8081 8082 ### # Cluster vhost # ### # 192.168.89.1 LoadModule proxy_module modules/mod_proxy.so LoadModule proxy_balancer_module modules/mod_proxy_balancer.so LoadModule proxy_http_module modules/mod_proxy_http.so LoadModule proxy_connect_module modules/mod_proxy_connect.so Listen 192.168.89.1:80 VirtualHost 192.168.89.1:80 ServerAdmin [EMAIL PROTECTED] DocumentRoot /var/www/html ServerName froto ErrorLog logs/cluster-error_log TransferLog logs/cluster-access_log ProxyRequests Off ProxyPreserveHost On ProxyErrorOverride On ProxyPassReverse / balancer://cluster/ ProxyPass / balancer://cluster/ stickysession=jsessionid nofailover=Off Proxy balancer://cluster/ Order deny,allow Allow from all BalancerMember http://gollum:8080 loadfactor=50 route=tomcat-c1 BalancerMember http://gollum:8081 loadfactor=50 route=tomcat-c2 BalancerMember http://gollum:8082 loadfactor=50 route=tomcat-c3 /Proxy Location /balancer-manager SetHandler balancer-manager Order Deny,Allow Deny from all Allow from localhost /Location /VirtualHost -- Brian Millett - [ Londo and Sheridan, Soul Mates] Ah, my good Captain Sheridan, all settled in? 'All settled, Ambassador.' - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
questions about the classloader in tomcat 6
Hello, I've setup my tomcat 6.0.13 with the CATALINA_HOME=/opt/tomcat and CATALINA_BASE=/opt/webBaseDir on a FC6 system. I read in http://tomcat.apache.org/tomcat-6.0-doc/class-loader-howto.html Common - This class loader contains additional classes that are made visible to both Tomcat internal classes and to all web applications. Normally, application classes should NOT be placed here. All unpacked classes and resources in $CATALINA_HOME/lib, as well as classes and resources in JAR files are made visible through this class loader. and in http://tomcat.apache.org/tomcat-6.0-doc/config/loader.html The description below uses the variable name $CATALINA_HOME to refer to the directory into which you have installed Tomcat 6, and is the base directory against which most relative paths are resolved. However, if you have configured Tomcat 6 for multiple instances by setting a CATALINA_BASE directory, you should use $CATALINA_BASE instead of $CATALINA_HOME for each of these references. and in conf/catalina.properties # List of comma-separated paths defining the contents of the common # classloader. Prefixes should be used to define what is the repository type. # Path may be relative to the CATALINA_HOME or CATALINA_BASE path or absolute. # If left as blank,the JVM system loader will be used as Catalina's common # loader. # Examples: # foo: Add this folder as a class repository # foo/*.jar: Add all the JARs of the specified folder as class # repositories # foo/bar.jar: Add bar.jar as a class repository common.loader=${catalina.home}/lib,${catalina.home}/lib/*.jar and also in org/apache/catalina/startup/Bootstrap.java while ((i=repository.indexOf(CATALINA_HOME_TOKEN))=0) { replace=true; if (i0) { repository = repository.substring(0,i) + getCatalinaHome() + repository.substring(i+CATALINA_HOME_TOKEN.length()); } else { repository = getCatalinaHome() + repository.substring(CATALINA_HOME_TOKEN.length()); } } while ((i=repository.indexOf(CATALINA_BASE_TOKEN))=0) { replace=true; if (i0) { repository = repository.substring(0,i) + getCatalinaBase() + repository.substring(i+CATALINA_BASE_TOKEN.length()); } else { repository = getCatalinaBase() + repository.substring(CATALINA_BASE_TOKEN.length()); } } And finally in the RUNNING.txt file In many circumstances, it is desirable to have a single copy of a Tomcat binary distribution shared among multiple users on the same server. To make this possible, you can pass a -Dcatalina.base=$CATALINA_BASE argument when executing the startup command (see (2)). In this -Dcatalina.base=$CATALINA_BASE argument, replace $CATALINA_BASE with the directory that contains the files for your 'personal' Tomcat instance. The behavior I've seen is that on startup, the jar files in CATALINA_HOME/lib are loaded before CATALINA_BASE/lib. Is that correct? I've seen that I must have the distributed jar files in CATALINA_HOME/lib, but for my personal tomcat, I have to put the jar files in CATALINA_BASE/lib. Are the documentation pages for all of the class loading inconsistant? Do I need to add to the catalina.properties file common.loader=${catalina.home}/lib,${catalina.home}/lib/*.jar,${catalina.base}/lib,${catalina.base}/lib/*.jar ? What is the correct place for the Common jars to get loaded with a multiple tomcat instances? I'm a little confused. Thanks. -- Brian Millett - [ Sinclair and Garibaldi, Deathwalker] You think it'll always be like this, Michael? Little powers at the mercy of bigger powers, politics before morality, expediency before justice? 'Seems to work for everybody...except you. Maybe that's why I like you.' - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
pluto 1.1.3 tomcat 6
Anyone get pluto (or jetspeed2) working with tomcat 6? I have not figured out all of the classloading issues yet. -- Brian Millett - [] Why are you here? 'We were never away. For the first time, your mind is quiet enough to hear me.' Why am I here? 'You have always been here.' -- Sheridan and Kosh (in Sheridan's dream), All Alone in the Night - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: questions about the classloader in tomcat 6
Filip Hanik - Dev Lists escribío: $CATALINA_HOME/lib Doesn't that defeat the CATALINA_BASE setup for multiple instances of tomcat? Brian Millett wrote: Hello, I've setup my tomcat 6.0.13 with the CATALINA_HOME=/opt/tomcat and CATALINA_BASE=/opt/webBaseDir on a FC6 system. I read in http://tomcat.apache.org/tomcat-6.0-doc/class-loader-howto.html Common - This class loader contains additional classes that are made visible to both Tomcat internal classes and to all web applications. Normally, application classes should NOT be placed here. All unpacked classes and resources in $CATALINA_HOME/lib, as well as classes and resources in JAR files are made visible through this class loader. and in http://tomcat.apache.org/tomcat-6.0-doc/config/loader.html The description below uses the variable name $CATALINA_HOME to refer to the directory into which you have installed Tomcat 6, and is the base directory against which most relative paths are resolved. However, if you have configured Tomcat 6 for multiple instances by setting a CATALINA_BASE directory, you should use $CATALINA_BASE instead of $CATALINA_HOME for each of these references. and in conf/catalina.properties # List of comma-separated paths defining the contents of the common # classloader. Prefixes should be used to define what is the repository type. # Path may be relative to the CATALINA_HOME or CATALINA_BASE path or absolute. # If left as blank,the JVM system loader will be used as Catalina's common # loader. # Examples: # foo: Add this folder as a class repository # foo/*.jar: Add all the JARs of the specified folder as class # repositories # foo/bar.jar: Add bar.jar as a class repository common.loader=${catalina.home}/lib,${catalina.home}/lib/*.jar and also in org/apache/catalina/startup/Bootstrap.java while ((i=repository.indexOf(CATALINA_HOME_TOKEN))=0) { replace=true; if (i0) { repository = repository.substring(0,i) + getCatalinaHome() + repository.substring(i+CATALINA_HOME_TOKEN.length()); } else { repository = getCatalinaHome() + repository.substring(CATALINA_HOME_TOKEN.length()); } } while ((i=repository.indexOf(CATALINA_BASE_TOKEN))=0) { replace=true; if (i0) { repository = repository.substring(0,i) + getCatalinaBase() + repository.substring(i+CATALINA_BASE_TOKEN.length()); } else { repository = getCatalinaBase() + repository.substring(CATALINA_BASE_TOKEN.length()); } } And finally in the RUNNING.txt file In many circumstances, it is desirable to have a single copy of a Tomcat binary distribution shared among multiple users on the same server. To make this possible, you can pass a -Dcatalina.base=$CATALINA_BASE argument when executing the startup command (see (2)). In this -Dcatalina.base=$CATALINA_BASE argument, replace $CATALINA_BASE with the directory that contains the files for your 'personal' Tomcat instance. The behavior I've seen is that on startup, the jar files in CATALINA_HOME/lib are loaded before CATALINA_BASE/lib. Is that correct? I've seen that I must have the distributed jar files in CATALINA_HOME/lib, but for my personal tomcat, I have to put the jar files in CATALINA_BASE/lib. Are the documentation pages for all of the class loading inconsistant? Do I need to add to the catalina.properties file common.loader=${catalina.home}/lib,${catalina.home}/lib/*.jar,${catalina.base}/lib,${catalina.base}/lib/*.jar ? What is the correct place for the Common jars to get loaded with a multiple tomcat instances? I'm a little confused. Thanks. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Brian Millett - [ Ivanova and Garibaldi, Survivors] What, does something about this surprise you, Mr. Garibaldi? '*Nothing* the government does surprises me.' That's a very Russian attitude. I commend you. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: questions about the classloader in tomcat 6
Filip Hanik - Dev Lists escribío: Brian Millett wrote: Filip Hanik - Dev Lists escribío: $CATALINA_HOME/lib Doesn't that defeat the CATALINA_BASE setup for multiple instances of tomcat? I always get the BASE and HOME mixed up. but I believe HOME is the installation of all the shared binaries, hence all common libraries would be placed there CATALINA_BASE is used for all runtime directories, such as webapps, work, conf etc Thanks -- Brian Millett - [ Londo and Timov, Soul Mates] They're merely expressing their feelings for me. 'I can do that. [Timov slaps Londo] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: questions about the classloader in tomcat 6
Rainer Jung escribío: The catalina.properties file is the one that defines the classloader search order. So you are free to make the order fit your own needs. For instance if you really like to share product installations and want to add instance specific things to the common loader, you would add a folder of your choice or a *.jar pattern inside CATALINA_BASE to the common.loader in catalina.properties. If there is a conflict between the home and the base classes, the order in the common.loader string will decide which gets loaded (first comes first). By the way: all class loaders used in former Tomcat releases are still present in TC 6 and there functionality is the same. Because this class loader hierarchy confused a lot of users, we decided to switch to a simple default distribution layout by moving everything into the common classloader. In catalina.properties you can see, that all loaders (common, server, shared) are still there and configurable, but only common has classes in its search path. Thanks. I saw that in catalina.properties. If I fill those values in (for the appropriate classloader) I can duplicate the behavior of the older systems. That will help in migrating large installations that are running tomcat 5 to tomcat 6. Is there a need to move to the newer common classloader? I guess my question is if the older ways will be deprecated in the future? Thanks. -- Brian Millett - [ N'Grath and Garibaldi, Survivors] You are police. 'Not any more. I'm a fugitive. Don't tell me you haven't heard?' Have heard. You are *still* police. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]