This is a very frequent question. The short answer is in the data folder of the application servers. Clearly if you are running in Domain Mode, they are stored into the Domain Controller data folder.
Finding where WildFly stores your applications
Firstly, let’s see what happens when you deploy an application on WildFly using a management tool such as the CLI or the Web Console.
Within your XMl configuration, you will find a reference to your application and a SHA-1 (Secure Hash Algorithm 1) that references it:
<deployments> <deployment name="batchletdemo.war" runtime-name="batchletdemo.war"> <content sha1="a3bb0a32c4475fca4e372db6830fc03ce1c6eab3"/> </deployment> </deployments>
Let’s see where is your application. Move to the $JBOSS_HOME/standalone folder and see the tree structure of the data/content folder:
$ tree data/content/ data/content/ └── a3 └── bb0a32c4475fca4e372db6830fc03ce1c6eab3 └── content
As you can see, there is a compressed file whose name is “content”.
You can check that it’s actually your application:
jar tvf content/a3/bb0a32c4475fca4e372db6830fc03ce1c6eab3/content 81 Fri Jul 14 16:46:00 CEST 2023 META-INF/MANIFEST.MF 0 Fri Jul 14 16:46:00 CEST 2023 META-INF/ 0 Fri Jul 14 16:46:00 CEST 2023 WEB-INF/ 0 Fri Jul 14 16:46:00 CEST 2023 WEB-INF/classes/ 0 Fri Jul 14 16:46:00 CEST 2023 WEB-INF/classes/META-INF/ 0 Fri Jul 14 16:46:00 CEST 2023 WEB-INF/classes/META-INF/batch-jobs/ 0 Fri Jul 14 16:46:00 CEST 2023 WEB-INF/classes/com/ . . . . . . .
Therefore, if you want to restore it, just rename it with the original name, for example:
$ mv content/a3/bb0a32c4475fca4e372db6830fc03ce1c6eab3/content batchletdemo.war
Great. We have explored where WildFly (or JBoss EAP) stores application when using management tools such as the CLI or the Web Console. From within the data/content folder, you can find and recover your existing applications.