1

I have some questions about Wildfly deployment

1.An ear, when deployed in wildfly, is extracted within standalone/tmp/vfs/deployment/ directory. Can I place a file there manually and still access it from web. (I can check it, but as of now I do not have any machine to test it).

  1. Can I create a file and place it there via some program. The reason I am asking this question is that I need to generate some files based on user input and provide the user with a link to that file. One way to do this is to statically link a directory in JBOSS and create the file there(access it using file handlers see this). I just want to know if it can be done at all using something like VFS.
Sudipta Roy
  • 740
  • 1
  • 9
  • 29

1 Answers1

0

If you need to persist to a file you'd want to create a new file handler, like the link you provided describes, and write the file to that folder. You don't want to try to use that temporary deployment directory. The content is not exploded by default so writing to it would likely fail.

If you don't need to persist to a file you can just use an output stream of some sort and the user will be able to download the file.

James R. Perkins
  • 16,800
  • 44
  • 60