Hei
Hei

Reputation: 513

How to change the struts-config.xml dynamically?

Recently I am trying Java with Struts 1. While I was playing with the tag in my struts-config.xml, I was wondering whether I can set the attribute, mainly path in struts-config.xml dynamically? Like using the value of a variable in the Action.java to config the xml file to have a dynamic forwarding path?

Thanks.

Upvotes: 1

Views: 2848

Answers (2)

schottsfired
schottsfired

Reputation: 131

See the last comment in this post on JavaRanch, I had to do this in the past and I believe that should work for you.

Upvotes: 1

Rakesh Patel
Rakesh Patel

Reputation: 383

it is not possible to change the struts-config dynamically because struts-config.xml file was load the time of the deployment so if it is load single time then without restart server not possible to load.

Upvotes: 0

Related Questions