Hello, folks!
I use
JBoss AS 7 and
Struts 2. My problem is I need to save config file(database settings) on the disk, like a simple myconfig.xml or something like this. One of the most big problems, that I have .war file and cannot to save inside /WEB-INF(hah, but I think it'd be good solution). Of course, I don't want, that somebody will be able to read my config from network, only for local usage. Just imagine, you go to
http://yourhost//install.action, then you fill out your database settings(username,password,host,port), my install.java(action class in struts.xml) and then it generates databaseSettings.xml and it need to retain somewhere. And the place shouldn't be available from network.
If I use
tomcat without .war or .ear files, I can do it easy:
write:(code in
servlet or in my case, in POJO class of struts2 action)
read:
What can I do? I wanna use .war, but I need to use config files. Where can I retain my configs in JBoss AS 7?