Return-Path: Delivered-To: apmail-pivot-user-archive@www.apache.org Received: (qmail 48725 invoked from network); 22 Jun 2010 20:25:03 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 22 Jun 2010 20:25:03 -0000 Received: (qmail 92521 invoked by uid 500); 22 Jun 2010 20:25:03 -0000 Delivered-To: apmail-pivot-user-archive@pivot.apache.org Received: (qmail 92497 invoked by uid 500); 22 Jun 2010 20:25:03 -0000 Mailing-List: contact user-help@pivot.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@pivot.apache.org Delivered-To: mailing list user@pivot.apache.org Received: (qmail 92488 invoked by uid 99); 22 Jun 2010 20:25:03 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 22 Jun 2010 20:25:03 +0000 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=MSGID_MULTIPLE_AT,SPF_NEUTRAL,URI_HEX X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [174.142.53.44] (HELO alliance.direcnode.com) (174.142.53.44) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 22 Jun 2010 20:24:55 +0000 Received: from scz-190-104-6-00236.wimaxtigo.bo ([190.104.6.236] helo=avilar) by alliance.direcnode.com with esmtpsa (TLSv1:RC4-MD5:128) (Exim 4.69) (envelope-from ) id 1ORA1G-0007iG-CT for user@pivot.apache.org; Tue, 22 Jun 2010 16:24:31 -0400 From: "Alejandro Vilar" To: References: <1277232416499-914940.post@n3.nabble.com> In-Reply-To: <1277232416499-914940.post@n3.nabble.com> Subject: RE: Help understanding classpaths/codebase with applets Date: Tue, 22 Jun 2010 16:23:15 -0400 Organization: SYNACOM S.R.L. Message-ID: <001b01cb1248$c2be0750$483a15f0$@vilar@synacom.com.bo> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 12.0 Thread-index: AcsSO1uj6C6gY4vmSha69Zay1tLeQAABo6nQ Content-Language: es-bo x-cr-hashedpuzzle: AHY3 BS34 CASo COmx Cqeg C7um DJal Dsv3 F1PB G8cS Hr77 Ijze JmsU J4lm KOdf Ko92;1;dQBzAGUAcgBAAHAAaQB2AG8AdAAuAGEAcABhAGMAaABlAC4AbwByAGcA;Sosha1_v1;7;{126B5935-18F0-453B-AF3F-E8E1CD7405BB};YQBsAGUAagBhAG4AZAByAG8ALgB2AGkAbABhAHIAQABzAHkAbgBhAGMAbwBtAC4AYwBvAG0ALgBiAG8A;Tue, 22 Jun 2010 20:22:35 GMT;UgBFADoAIABIAGUAbABwACAAdQBuAGQAZQByAHMAdABhAG4AZABpAG4AZwAgAGMAbABhAHMAcwBwAGEAdABoAHMALwBjAG8AZABlAGIAYQBzAGUAIAB3AGkAdABoACAAYQBwAHAAbABlAHQAcwA= x-cr-puzzleid: {126B5935-18F0-453B-AF3F-E8E1CD7405BB} X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - alliance.direcnode.com X-AntiAbuse: Original Domain - pivot.apache.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - synacom.com.bo X-Source: X-Source-Args: X-Source-Dir: X-Virus-Checked: Checked by ClamAV on apache.org Hi John, I'm not sure if this could be helpful for you(Plan A), but to use a unique configuration file for Log4j in your wars you could set a system property. If you are booting tomcat from startup.bat script edit catalina.bat script and put something like this: set JAVA_OPTS=%JAVA_OPTS% -Dlog4j.configuration="path-to-your-configuration-file" Or if is running as a service run TOMCAT_PATH/bin/tomca5tw.exe and setup a system property for your configuration file. Doing this you can retrieve this property in all your wepApps. Note that my suggestion is only for Windows OS, I didn't check it in other platforms but I guess you could do some similar modifications. (http://logging.apache.org/log4j/1.2/manual.html#defaultInit) Hope this helps, Alejandro -----Original Message----- From: JohnRodey [mailto:timothyddaly@yahoo.com] Sent: Martes, 22 de Junio de 2010 02:47 p.m. To: user@pivot.apache.org Subject: Help understanding classpaths/codebase with applets So I'm still tryin to get Log4j all setup but keep running into road blocks. Now I'm running into issues where my knowledge of applets is lacking and was hoping I could find some help. Plan A) What I would like to do is have one log4j.xml configuration file stored directly under my tomcat directory (In other words I don't want a seperate log4j.xml file for each war that I have, I just want them all to share one config file). However I don't know how to give my applet access to something thats not in the directory for the applet. So directory structure like this: tomcat ..log4j.xml ..webapps ....mypivotapp ....someotherapp Plan B) If I can't do (A) then my startup script can make a copy of the log4j.xml and put it directly in the mypivotapp directory. Although looks like by default the applet can't see it there. Looking into the codebase_lookup property shows that when this is false applets only use the jars in their classpath. Will enabling this help, documentation says that there is a performance hit for doing so, which leads me to believe there are better ways. Plan C) My startup script could import my log4j.xml file into my jar file on my classpath. ex. tomcat/webapps/mypivotapp/lib/mylib.jar The goal is to just need to edit one file to alter all logging. Thanks! -- View this message in context: http://apache-pivot-users.399431.n3.nabble.com/Help-understanding-classpaths -codebase-with-applets-tp914940p914940.html Sent from the Apache Pivot - Users mailing list archive at Nabble.com.