Return-Path: Delivered-To: apmail-jakarta-tomcat-user-archive@apache.org Received: (qmail 67917 invoked from network); 8 Jan 2002 23:50:07 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 8 Jan 2002 23:50:07 -0000 Received: (qmail 3050 invoked by uid 97); 8 Jan 2002 23:48:45 -0000 Delivered-To: qmlist-jakarta-archive-tomcat-user@jakarta.apache.org Received: (qmail 3006 invoked by uid 97); 8 Jan 2002 23:48:44 -0000 Mailing-List: contact tomcat-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Tomcat Users List" Reply-To: "Tomcat Users List" Delivered-To: mailing list tomcat-user@jakarta.apache.org Received: (qmail 2972 invoked from network); 8 Jan 2002 23:48:42 -0000 Message-ID: <00e301c1989e$a7f090a0$0f0efd0a@earthlink> From: "James Chuang" To: "Tomcat Users List" , References: <02010823045500.29609@maptop> Subject: Re: class loading tc 3.3 & virtual hosts Date: Tue, 8 Jan 2002 15:46:12 -0800 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Yes you can. You can deploy 2 separate tomcat's each with their own ports, contexts, etc. This will allow you to run your apps in 2 separate VMs, so they can use different versions of classes etc. This was in Tomcat 3.23-3.3. I think 4 should work the same way with this? jchuang ----- Original Message ----- From: "Martin v. Boehlen" To: Sent: Tuesday, January 08, 2002 2:04 PM Subject: class loading tc 3.3 & virtual hosts > Greetings Users, > > is it possible to use two completely separate virtual hosts > with tomcat ? > What I want to do is using two virtual hosts on the same box. > One for real web serving and one for development. > > My problems so far are: > 1. Class loading - > Can I configure tomcat in a way that classes don't > interfere between virtual hosts ? > 2. Context scope - > Can I use JkMount with a single path for all > applications ? > 3. Host aliases > Can I do an 'AutoWebApp' for an 'Alias' and > a full host name at the same time ? > > Please note, that: > The application name is 'jRolodex', but I used the 'numguess.jsp' > example for testing. > 'www' is the web host and > 'javadex' is the development host. > > A 'build.sh all' copies the application files to host 'javadex' > i.e. the 'docBase' directory of virtual host > 'javadex.tiade-voboe.de'. > > A 'build.sh dist' produces a 'jRolodex.war' and a 'jRoldex.jar' > in the 'docBase' directory of host 'www.tiade-voboe.de'. > > Before I plunge into the details, please look at the partial > config files, stack and SW version at the end of this mail. > > Now the gory details: > > ad 1. When i change some code in the application and afterwards do a > 'build.sh all' for application 'jRolodex' without doing a > 'build.sh dist', the first virtual server I hit works fine! > No matter wether it is 'www' or 'javadex'. > The second server always gets an 'Error 500' (see error stack at > end of mail). > It seems to me, that tomcat does not load the appropriate class > definitions. > > ad 2. I tried to use '/wapps' as the context path (with and without a > 'prefix' in 'AutoWebApp') because I wanted something like > 'JkMount /wapps' in 'httpd.conf'. It didn't work. So I have > to mount every application explicitly. > > ad 3. I tried to use the 'Alias' definition in 'AutoWebApp'. I.e.: > prefix="/wapps" > host="javadex" /> > It worked fine but it didn't work for 'javadex.tiade-voboe.de' (and > vice versa). > > > > # ----- The Waltons, Daltons, everyone > > ServerAdmin technik@tiade-voboe.de > ServerName www.tiade-voboe.de > DocumentRoot "/usr/local/httpd/htdocs/www" > ServerAlias www www.tiade-voboe.de > > > Options Indexes -FollowSymLinks -Includes +MultiViews > Order deny,allow > Allow from all > > > JkMount /*.jsp ajp13 > JkMount /wapps/jRolodex ajp13 > JkMount /wapps/jRolodex/* ajp13 > > > # ----- Tomcat developer > > ServerAdmin boehlen@tiade-voboe.de > ServerName javadex.tiade-voboe.de > DocumentRoot "/usr/local/httpd/htdocs/javadex" > ServerAlias javadex javadex.tiade-voboe.de > > # ----- Here comes the directory accessible by all users of the local > network > > Options Indexes +FollowSymLinks -Includes +MultiViews > Order allow,deny > Allow from 192.168.17.0/255.255.255.0 > > > JkMount /*.jsp ajp13 > JkMount /wapps/jRolodex ajp13 > JkMount /wapps/jRolodex/* ajp13 > > > > > > > > > > > docBase="/usr/local/httpd/webapps/www" > debug="0" > reloadable="False" > > > path="/var/log/tomcat/www_tc.log" > verbosityLevel="ERROR"/> > path="/var/log/tomcat/www_servlet.log" > servletLogger="true" > verbosityLevel = "ERROR"/> > target="/usr/local/httpd/webapps/www" /> > prefix="/wapps" > host="www.tiade-voboe.de" /> > > > > > > > docBase="/usr/local/httpd/webapps/javadex" > debug="99" > reloadable="True" > > path="/var/log/tomcat/javadex_tc.log" > verbosityLevel = "DEBUG"/> > path="/var/log/tomcat/javadex_servlet.log" > servletLogger="DEBUG"/> > prefix="/wapps" > host="javadex.tiade-voboe.de" /> > > > > > > > > > > > Error: 500Location: /wapps/jRolodex/numguess.jspInternal Servlet Error: > org.apache.jasper.JasperException: object is not an instance of declaring > class > at > org.apache.jasper.runtime.JspRuntimeLibrary.introspecthelper(Unknown Source) > at org.apache.jasper.runtime.JspRuntimeLibrary.introspect(Unknown > Source) > at numguess_1._jspService(numguess_1.java:84) > at org.apache.jasper.runtime.HttpJspBase.service(Unknown Source) > at javax.servlet.http.HttpServlet.service(HttpServlet.java) > at org.apache.tomcat.facade.ServletHandler.doService(Unknown Source) > at org.apache.tomcat.core.Handler.invoke(Unknown Source) > at org.apache.tomcat.core.Handler.service(Unknown Source) > at org.apache.tomcat.facade.ServletHandler.service(Unknown Source) > at org.apache.tomcat.core.ContextManager.internalService(Unknown > Source) > at org.apache.tomcat.core.ContextManager.service(Unknown Source) > at > org.apache.tomcat.modules.server.Ajp13Interceptor.processConnection(Unknown > Source) > at org.apache.tomcat.util.net.TcpWorkerThread.runIt(Unknown Source) > at > org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(Unknown Source) > at java.lang.Thread.run(Thread.java:539) > Root cause: > java.lang.IllegalArgumentException: object is not an instance of declaring > class > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:42 ) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl .java:28) > at java.lang.reflect.Method.invoke(Method.java:327) > at > org.apache.jasper.runtime.JspRuntimeLibrary.introspecthelper(Unknown Source) > at org.apache.jasper.runtime.JspRuntimeLibrary.introspect(Unknown > Source) > at numguess_1._jspService(numguess_1.java:84) > at org.apache.jasper.runtime.HttpJspBase.service(Unknown Source) > at javax.servlet.http.HttpServlet.service(HttpServlet.java) > at org.apache.tomcat.facade.ServletHandler.doService(Unknown Source) > at org.apache.tomcat.core.Handler.invoke(Unknown Source) > at org.apache.tomcat.core.Handler.service(Unknown Source) > at org.apache.tomcat.facade.ServletHandler.service(Unknown Source) > at org.apache.tomcat.core.ContextManager.internalService(Unknown > Source) > at org.apache.tomcat.core.ContextManager.service(Unknown Source) > at > org.apache.tomcat.modules.server.Ajp13Interceptor.processConnection(Unknown > Source) > at org.apache.tomcat.util.net.TcpWorkerThread.runIt(Unknown Source) > at > org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(Unknown Source) > at java.lang.Thread.run(Thread.java:539) > > > > > > srv01:~ # uname -a > Linux srv01.tiade-voboe.de 2.4.16 #38 SMP Fri Dec 28 20:37:27 CET 2001 i686 > unknown > srv01:~ # java -version > java version "1.4.0-beta3" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-beta3-b84) > Java HotSpot(TM) Client VM (build 1.4.0-beta3-b84, mixed mode) > srv01:~ # file /usr/local/httpd/tomcat > /usr/local/httpd/tomcat: symbolic link to jakarta-tomcat-3.3 > > > martin@maptop:~ > java -version > java version "1.3.1_02" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1_02-b02) > Java HotSpot(TM) Client VM (build 1.3.1_02-b02, mixed mode) > martin@maptop:~ >konqueror --version > Qt: 2.3.0 > KDE: 2.1.2 > Konqueror: 2.1.1 > > > -- > To unsubscribe: > For additional commands: > Troubles with the list: > -- To unsubscribe: For additional commands: Troubles with the list: