Working on a lift and shift application.
Existing project is in any.
I have a migrated it to a gradle multimodule project that is built into an ear with 2 war files.
Now there is some code in the application that writes to a file placed in the webapp/files/sample.txt
So according to existing code, some data is written to this file then this file is used as an attachment in mail and then the file is cleared again.
This is working fine in any.
Now after migration I am not able to get an handle on the file sample to.txt using the existing code. It throws file not found exception
They have used facescontext.getCurrentaInstance.getExternalcontext.getRealpath().
Any idea how I can read write to this file.