if you did not place log4j.properties on classpath then <SystemProperty> Set the resource string variable to the value of the log4j.configuration system property. The preferred way to specify the default initialization file is through the log4j.configuration system property. In case the system property log4j.configuration is not defined, then set the string variable resource to its default value "log4j.properties".
http://logging.apache.org/log4j/1.2/manual.html </SystemProperty> <Code> then use Log4j Loader.getResource to load properties file http://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/helpers/Loader.html#getResourcejava.lang.String </Code> Bon Chance, Martin ______________________________________________ Note de déni et de confidentialité Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni. > Date: Fri, 6 Sep 2013 09:40:03 +0100 > From: christal...@yahoo.fr > Subject: Struts 2.3.15.1 How to read external properties files or conf files > To: user@struts.apache.org > > Using log4j.properties instead of log4j.xml is not a problem with Struts > 2.3.15.1 ( or should it be ? ) > But with my own properties files ( jdbc.properties ) or configuration files ( > ldap.conf ) it doesn't work. > > > Is there any example with external files . > Not an upload file by input forms. . > > Or do we have to use another java classes ?