How to access the JBoss data directory inside an application?

I would like to upload files to the server / default / data directory using a simple download servlet and have access to them from my application, but I cannot find a way to access it. I tried

getServletContext().getRealPath("data"); 

but it did not help.

Please help me.

+7
source share
1 answer

to get the absolute path just do:

 System.getProperty("jboss.server.data.dir"); 
+10
source

All Articles