on 03-16-2005 6:45 AM
Hi all,
I want to use a logon.properties file when I initial a JCO connection pool in my webdynpro DC (JCO.addClientPool()),but I found when I deployed this DC to the server, it always giv e me an FileNotFoundException. So I donot know how to deploy a .properties file to the server and how to access this file in my Java code?
Thans and Best regards
Deyang
Hi,
1) put .properties file to your packege under src\packages folder (src\packages\com\sdn\properties\jco.properties)
2) load property:
final InputStream is = getClass().getClassLoader().getResourceAsStream("com/sdn/properties/jco.properties");
final Properties properties = new Properties();
try
{
properties.load(is);
}
catch(Exception e)
{
wdComponentAPI.getMessageManager().reportException(new WDNonFatalException(e), false);
}
Regatds Maxim R.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.