axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stadelmann Josef" <josef.stadelm...@axa-winterthur.ch>
Subject AW: Unable to locate properties file in .war file
Date Tue, 07 Aug 2012 12:45:23 GMT
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
 
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-war-plugin</artifactId>
                <version>2.1.1</version>
                <configuration>
                    <warName>SpezplaFS</warName>
                    <warSourceDirectory>${basedir}/src/webapp</warSourceDirectory>
                    <archive>
                        <addMavenDescriptor>false</addMavenDescriptor>
                    </archive>
                    <webResources>
                        <resource>
                            <directory>${project.build.directory}/modules/</directory>
                            <targetPath>WEB-INF/lib</targetPath>
                            <includes>
                                <include>addressing*.mar</include>
                            </includes>
                        </resource>
                    </webResources>
                </configuration>
            </plugin>

Josef

-----Urspr√ľngliche Nachricht-----
Von: Antonio Ruiz [mailto:aruizma@gmail.com] 
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


Mime
View raw message