tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From José Moreira <jmore...@e-terno.net>
Subject Properties [DONE]
Date Wed, 26 Feb 2003 17:59:43 GMT
my code:

        Properties properties = new Properties();

        String path =
getClass().getClassLoader().getResource("config.properties").getPath().toStr
ing();

        try {

            FileInputStream file = new FileInputStream(path);

            properties.load(file);

        } catch (FileNotFoundException f) {

            this.status = "nao abriu :"+path;

        } catch (IOException e) {

            this.status = path+" IOException";

        } catch (NullPointerException n) {

            this.status = path+" NullPointerException";

        }

        this.status = properties.getProperty("database");



---------------<*>----------------------
José Moreira

Técnico de Informática | IT Technician

Vila Nova de Gaia, Portugal

E-Mail: jmoreira@e-terno.net

MSN: jose_guedes@hotmail.com

ICQ: 136936120

IRC: ethernal (irc.ptnet.org)



---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message