Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you get a Struts2 value from the .properties file programatically?

Say I have a struts.properties file with a defined value uploads.directory . How can I access that value from an Actioncontext programatically?

like image 828
Josh Avatar asked Jan 22 '26 13:01

Josh


1 Answers

You can use getText("some.property.name") which return you the property value

http://struts.apache.org/maven/struts2-core/apidocs/com/opensymphony/xwork2/ActionSupport.html

like image 167
Roy Chan Avatar answered Jan 25 '26 19:01

Roy Chan



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!