cancel
Showing results for 
Search instead for 
Did you mean: 

How to get properties file value of one application from another app?

Former Member
0 Kudos

Hello,

I have a DynPro application called "CommitteesApp".

When I load it the component controller intializes parameters from a properties file located on server using this code:

WDDeployableObjectPart App = wdThis.wdGetAPI().getComponent().getApplication().getDeployableObjectPart();

IWDConfiguration Configprop = WDConfiguration.getConfigurationByName(App, "Committees");

wdContext.currentContextElement().setROLE_URL(Configprop.getStringEntry("ROLE_URL"));

So far so good.

Now, I've created another application based on the same component called "ProApp". I would like this application to have the getStringEntry "ROLE_URL" as well. The problem is that this properties file is attached on the WAS to the first application so the new application can't "see" it. What do I need to do in order for it to see it? Do I need to create a seperate properites file just for the new app? If yes, than why? and wouldn't it destroy the former properties file?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

where have you put your config file? You can use your config file across applications if you put it inside your component folder.

Go to Navigator view in NWDS-><your project>->src->configuration->. Put your file here.

Now use this code:


WDDeployableObjectPart d = wdComponentAPI.getDeployableObjectPart();
try{
IWDConfiguration c = WDConfiguration.getConfigurationByName(d,"<whatever>");
}
catch(WDConfigurationNotFoundException ex){
}
catch(WDInvalidConfigParameterException iex){
}

Regards,

Satyajit.

Message was edited by: Satyajit Chakraborty

Message was edited by: Satyajit Chakraborty

Former Member
0 Kudos

Hello Satyajit,

You are right, I haven't noticed that I am using this properties file on the application level and not the component level. It solved my problem, 10X alot!

Answers (0)