Differences

This shows you the differences between two versions of the page.

Link to this comparison view

72:custom_report_tipsandtricks_retrieving_property [2019/02/07 13:49]
ext-bkkr created
72:custom_report_tipsandtricks_retrieving_property [2019/03/08 19:00] (current)
ext-bkkr
Line 1: Line 1:
 ====== Retrieving Property Key Values ====== ====== Retrieving Property Key Values ======
  
 +This example shows how to retrieve the localization property message keys from Stages.
 +
 +<​code>​
 +properties_en = new Properties();​
 +properties_de = new Properties();​
 +stream_en = new FileInputStream("​tomcat/​webapps/​pkit/​WEB-INF/​classes/​
 +LocalPKit.properties"​);​
 +stream_de = new FileInputStream("​tomcat/​webapps/​pkit/​WEB-INF/​classes/​
 +LocalPKit_de.properties"​);​
 +properties_en.load(stream_en);​
 +properties_de.load(stream_de);​
 +stream_de.close();​
 +stream_en.close();​
 +
 +/* Retrieve message key abc */
 +var myname = properties_en.getProperty("​abc"​)
 +var myname = properties_de.getProperty("​abc"​)
 +</​code>​