If the purpose is to upload files, you can put the files in any common shared directory that both can see (referenced by relative file name, or to a defined location).
If you have potential contention on the files, the way that is usually handled is to write the files to a temporary file name, and rename the file when done. Rename is an atomic operation, unlike writing a file.
I don't see in your question a need for actual communication. For that, EJBs or JMS are the obvious choices in JBoss, but if all you are doing is sharing files, that seems overkill.
EDIT: I'm assuming here that you are writing files using FileOutputStream/FileWriter and the like. In that case, it is a simple case of making a directory or file share that both processes running the respective JBoss instances have rights. If you aren't familiar with Unix file administration and rights, then serverfault.com is the right place to ask about those details.