Return-Path: X-Original-To: apmail-axis-java-user-archive@www.apache.org Delivered-To: apmail-axis-java-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 329ED9EE9 for ; Tue, 7 Aug 2012 12:45:57 +0000 (UTC) Received: (qmail 91630 invoked by uid 500); 7 Aug 2012 12:45:55 -0000 Delivered-To: apmail-axis-java-user-archive@axis.apache.org Received: (qmail 91463 invoked by uid 500); 7 Aug 2012 12:45:55 -0000 Mailing-List: contact java-user-help@axis.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-user@axis.apache.org Delivered-To: mailing list java-user@axis.apache.org Received: (qmail 91450 invoked by uid 99); 7 Aug 2012 12:45:55 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 07 Aug 2012 12:45:55 +0000 X-ASF-Spam-Status: No, hits=-5.0 required=5.0 tests=RCVD_IN_DNSWL_HI,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [194.40.127.75] (HELO C005894.axa.ch) (194.40.127.75) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 07 Aug 2012 12:45:45 +0000 X-IronPort-AV: E=Sophos;i="4.77,726,1336341600"; d="scan'208";a="49006513" Received: from c005811.chres1.doleni.net ([194.40.60.11]) by C005894.ch.winterthur.com with ESMTP; 07 Aug 2012 14:45:23 +0200 Received: from c005815.chres1.doleni.net ([194.40.60.9]) by c005811.chres1.doleni.net with Microsoft SMTPSVC(6.0.3790.4675); Tue, 7 Aug 2012 14:45:24 +0200 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-MimeOLE: Produced By Microsoft Exchange V6.5 Subject: AW: Unable to locate properties file in .war file Date: Tue, 7 Aug 2012 14:45:23 +0200 Message-ID: In-Reply-To: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Unable to locate properties file in .war file Thread-Index: Ac1yVPnDDWtRN1pVQ9Kj7HhHS99m5wCPMrNg References: From: "Stadelmann Josef" To: X-OriginalArrivalTime: 07 Aug 2012 12:45:24.0156 (UTC) FILETIME=[8360D7C0:01CD749A] I am putting my log4j.properties into C:\Program Files\Apache Software Foundation\Apache Tomcat = 6.0.26\webapps\SpezplaFS\WEB-INF\classes this delivered by a SpezplaFS.war file of course, and it works with = Axis2-1.6.1 Now where to put it in the war ? With NetBeans I have it located under the "project node" / WebPages / = WEB-INF / classes And the rest is done by mavens war plugin for me =20 org.apache.maven.plugins maven-war-plugin 2.1.1 SpezplaFS = ${basedir}/src/webapp false = ${project.build.directory}/modules/ WEB-INF/lib addressing*.mar Josef -----Urspr=FCngliche Nachricht----- Von: Antonio Ruiz [mailto:aruizma@gmail.com]=20 Gesendet: Samstag, 4. August 2012 17:22 An: java-user@axis.apache.org Betreff: Unable to locate properties file in .war file Dear all, I'm using Axis2 to generate a Web service and I would like to use some configuration files (for properties and images) included in the .war file to configure it. For this purpose, I'm using the following method: this.getClass().getResourceAsStream("config.file") I have put the config.file in several directories of my .war file. However, in all the cases the method does not found the file. Where should I put the config.file? Is the way I'm using to recover it = correct? Could you be so kind of helping me, please? Best regards. --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org For additional commands, e-mail: java-user-help@axis.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org For additional commands, e-mail: java-user-help@axis.apache.org