Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I access the JBoss data directory from inside an application?

I would like to upload files to my the server/default/data directory using a simple upload servlet and be able to access them from within my application, but I can't seem to find how to access it. I tried

getServletContext().getRealPath("data");

but that didn't help.

like image 534
Zoltán Avatar asked Dec 16 '11 10:12

Zoltán


People also ask

What is JBoss server base dir?

jboss.server.base.dir/configuration. jboss.server.data.dir. The directory used for persistent data file storage.

What are the main directories provided in JBoss?

In Figure 3.1, “The JBoss AS directory structure”, the default server configuration file set is shown expanded. It contains a number of subdirectories: conf, data, deploy, lib, log, and tmp. In a clean installation, only the conf, deploy, and lib directories will exist.

Where is JBoss configuration file?

The default JBoss configuration file set is located in the JBOSS_DIST/server/default directory. JBoss allows you to add more than one configuration set so a server can easily be run using alternate configurations.

Where is JBoss home directory in Linux?

If you do: more /etc/passwd and look for the JBoss user you may find it to point at /usr/local/jboss as well.


1 Answers

to get the absolute path, just do:

System.getProperty("jboss.server.data.dir");
like image 107
Robin Avatar answered Oct 13 '22 10:10

Robin