# how to use writeAppConfig ?

**URL:** <https://community.wowza.com/t/how-to-use-writeappconfig/44094>\
**Category:** Wowza Developer Dojo\
**Tags:** wowza-streaming-server-java-api\
**Created:** [November 13, 2014, 12:54am UTC](https://community.wowza.com/t/how-to-use-writeappconfig/44094 "2014-11-13T00:54:10Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![qizhao\_lee](https://avatars.discourse-cdn.com/v4/letter/q/b3f665/32.png) [@qizhao\_lee](https://community.wowza.com/u/qizhao_lee)\
**Post date:** [November 13, 2014, 12:54am UTC](https://community.wowza.com/t/how-to-use-writeappconfig/44094/1 "2014-11-13T00:54:10Z")

</div>

I want set node to “live” in Application.xml file, I use code:

IApplication app = vhost.getApplication(appName);

app.writeAppConfig(“AppType”, “live”);

The file Application.xml content is deleted ,only “live”。

\<?xml version="1.0" encoding="UTF-8"?\>

---

<div class="post-metadata">

**Author:** ![Paul\_Shields](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/paul_shields/32/390_2.png) [@Paul\_Shields](https://community.wowza.com/u/Paul_Shields)\
**Post date:** [November 14, 2014, 4:07pm UTC](https://community.wowza.com/t/how-to-use-writeappconfig/44094/2 "2014-11-14T16:07:09Z")

</div>

Hi,

It would be useful to have some context for what you are trying to achieve. Rewriting AppType on a running app is probably not the safest method. I believe the changes only last as long as the app is in memory so it’s not a permanent change, but maybe that’s what you’re after. Can you expand on your desired outcome and the reasons behind it? There may well be other options.

Paul

---

<div class="post-metadata">

**Author:** ![qizhao\_lee](https://avatars.discourse-cdn.com/v4/letter/q/b3f665/32.png) [@qizhao\_lee](https://community.wowza.com/u/qizhao_lee)\
**Post date:** [November 16, 2014, 1:44am UTC](https://community.wowza.com/t/how-to-use-writeappconfig/44094/3 "2014-11-16T01:44:32Z")

</div>

writeAppConfig(String sName, String data)

Method to write xml config file…

readAppConfig(String sName)

Method to read xml config file…

How to use these functions?
