cancel
Showing results for 
Search instead for 
Did you mean: 

How to use .properties files in Webdynpro Java code?

Former Member
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

former_member182372
Active Contributor
0 Kudos

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.

Answers (0)