cancel
Showing results for 
Search instead for 
Did you mean: 

How to configure web dynpro application

Former Member
0 Kudos

I am building a web dynpro Java application that will run outside of the Portal. I need to store some server specific URLs somewhere where I can change the values when the code moves from DEV to QA to PROD through NWDI.

In servlets there is servlet context, is there anything in web dynpro that would allow me to configure the application on each server without changing the code?

Accepted Solutions (1)

Accepted Solutions (1)

junwu
Active Contributor
0 Kudos

yes, web dynpro has standard support for this.

	  IWDDeployableObject deployableObject = wdComponentAPI.getDeployableObjectPart().getDeployableObject();
	  String configName = "test"; //This should match with the name specified in the src->configuration->test.properties
	 IWDConfiguration config =  WDConfiguration.getConfigurationByName(deployableObject, configName)
config.getStringEntry("key")
	  
	  //For 7.1 instead of the above code use
	  IWDWebModule webModule = wdComponentAPI.getDeployableObjectPart().getWebModule();
	  WDConfiguration.getConfigurationByName(webModule, "your properties file");

Edited by: John Wu on Aug 25, 2011 9:42 PM

Answers (0)