-
1. Re: Application path
pmuir Oct 24, 2007 7:36 AM (in response to kauefelipe)Get a URL handle on a file you know the location of e.g. application.xml and construct an absolute path from that. Btw I wouldn't store files inside your ear if I were you, what happens when you deploy the ear non-exploded?
-
2. Re: Application path
kauefelipe Oct 24, 2007 5:33 PM (in response to kauefelipe)"pete.muir@jboss.org" wrote:
Get a URL handle on a file you know the location of e.g. application.xml
Sorry, but how can i get this?
"pete.muir@jboss.org" wrote:
Btw I wouldn't store files inside your ear if I were you, what happens when you deploy the ear non-exploded?
After situable the app this wouldn´t change it, then i think that aren´t problem in save files there. Meanwhile if i can´t save there, what do u sugest me? -
3. Re: Application path
modoc Oct 24, 2007 7:45 PM (in response to kauefelipe)I'd go with a configured external directory myself. I agree with Pete, writing new files inside your ear isn't the way I'd go at all. Ears are really meant to be immutable deployment objects. I'd define a configurable path for the file storage like /opt/myapp/data/ or whatever makes sense to you.
-
4. Re: Application path
kauefelipe Oct 25, 2007 6:27 AM (in response to kauefelipe)"modoc" wrote:
I'd go with a configured external directory myself. I agree with Pete, writing new files inside your ear isn't the way I'd go at all. Ears are really meant to be immutable deployment objects. I'd define a configurable path for the file storage like /opt/myapp/data/ or whatever makes sense to you.
Ok. Then can i load the folder name by some propertie file? I know this in .NET framework but here i don´t! :(
Could someone give me one example with this? Load the propertie from configuration file? -
5. Re: Application path
norman.richards Oct 25, 2007 9:32 AM (in response to kauefelipe)JBoss provides server/default/data for this type of use. (or server/default/tmp for temporary files) You can lookup the data directory from the ServerConfig MBean. I think it also may be available in the jboss.server.data.dir system property.
-
6. Re: Application path
kauefelipe Oct 25, 2007 10:42 PM (in response to kauefelipe)I´ll try this! Thanks a lot!!!