Return-Path: Delivered-To: apmail-jakarta-tomcat-user-archive@www.apache.org Received: (qmail 1731 invoked from network); 16 Aug 2004 14:41:40 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 16 Aug 2004 14:41:40 -0000 Received: (qmail 19338 invoked by uid 500); 16 Aug 2004 14:40:57 -0000 Delivered-To: apmail-jakarta-tomcat-user-archive@jakarta.apache.org Received: (qmail 19183 invoked by uid 500); 16 Aug 2004 14:40:55 -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 19170 invoked by uid 99); 16 Aug 2004 14:40:55 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [131.212.109.42] (HELO mx0.d.umn.edu) (131.212.109.42) by apache.org (qpsmtpd/0.27.1) with ESMTP; Mon, 16 Aug 2004 07:40:49 -0700 Received: from mx2.d.umn.edu (mx2.d.umn.edu [131.212.109.37]) by mx0.d.umn.edu (8.12.9/8.12.9) with SMTP id i7GEejD7024196 for ; Mon, 16 Aug 2004 09:40:47 -0500 (CDT) Received: from mx3.d.umn.edu ([131.212.109.40]) by mx2.d.umn.edu (SAVSMTP 3.1.3.37) with SMTP id M2004081609404707699 for ; Mon, 16 Aug 2004 09:40:47 -0500 Received: from localhost (imp7.d.umn.edu [131.212.109.166]) by mx3.d.umn.edu (8.12.9/8.12.9) with ESMTP id i7GEdYW7005725 for ; Mon, 16 Aug 2004 09:39:34 -0500 (CDT) Received: from 134.156.13.8 ([134.156.13.8]) by webmail.d.umn.edu (Horde) with HTTP for ; Mon, 16 Aug 2004 09:39:34 -0500 Message-ID: <1092667174.6fbd346c80c12@webmail.d.umn.edu> Date: Mon, 16 Aug 2004 09:39:34 -0500 From: nhelder@d.umn.edu To: tomcat-user@jakarta.apache.org Subject: RE: $CATALINA_HOME\shared configuration question References: <9C5166762F311146951505C6790A9CF80229BE9A@US-VS1.corp.mpi.com> In-Reply-To: <9C5166762F311146951505C6790A9CF80229BE9A@US-VS1.corp.mpi.com> MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Disposition: inline Content-Transfer-Encoding: 7bit User-Agent: Internet Messaging Program (IMP) 4.0-cvs X-Originating-IP: 134.156.13.8 X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Sorry for the delay; I initially sent this message in the wrong direction and then was gone for the weekend. I think the bottom line is that I need to familiarize myself more with standard Tomcat file structures and packaging techniques, and any places to go for that information would be more than welcome, but for what it's worth, here's my reply: > From: QM > > Just a hunch, but I don't think that's possible. The concept of the > shared area would imply (at least, to me) that it contains stable, > unchanging code. In terms of the unchanging storage area, this is was my thinking as well. (I suppose the one detail I left out is that I was hoping to find a place to set the 'reloadable' flag [or equivalent] for the 'shared' folder so it could be set to true for our development server. The fact that the contents of the 'shared' folder are cached becomes more of an issue in this case, as if one is writing a new class and testing it along the way, in order for the .jsp pages to see the changes, Tomcat needs to be restarted to clear it's cache of the 'shared' folder. Which isn't a _huge_ deal, but it does get rather irritating.) > What's your end-goal here? I'm all for re-use of a codebase; but is > there any reason you're not just wrapping shared classes into JARs and > distributing those to each webapp? Well, that's the approach we've been using with our swing development - creating applets that, in the html for loading the applet, what .jar files to include are specified. However, I'm pretty new to the .jsp world, and I'm not sure that I know how to achieve the same end there. So maybe that's quesiton #1 - is it possible to "import" a jar file into a .jsp page? To date, we've taken the background classes that were written to support our swing applications and put them out into the web inf/classes folder of our "web" Tomcat context. The .jsp pages themselves have then employed import statements to grab whatever specific classes they need to run. This has worked well enough, but became wrinkly once we started integrating a web security package (Open Network's DirectorySmart, an LDAP and role-based web access control application) - it likes to have it's own context to take over. So now we are looking at having "web" and "securedweb" contexts, with mirrored folder structures, just moving the .jsp or applet information from the one context to the other to secure it. Ok, so now that means two web-inf folders. We have a development server, a production server, and a backup production server. So 6 web-inf folders to keep track of. While ant helps a lot, and it would just be a couple more lines in our publish task to move the files out to the other locations, we'd really like to only have to worry about a single collection of class files on each server. So, we started looking for a place to put our classes that would be common to both the "web" and "securedweb" Tomcat contexts. That's when we ran in to the $CATALINA_HOME\shared folder. But, with the needed rebooting as outlined above each time one of the classes changes in this location, this hasn't turned out to be as ideal a solution as we had hoped, and something tells me that this sort of situation has been encountered before and that there's got to be a better approach. So, I suppose that makes question #2: is there a way to have two seperate tomcat contexts use the same web-inf folder? Thanks again, - Nathan --------------------------------------------------------------------- To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: tomcat-user-help@jakarta.apache.org