I've written a small web application that allows the client to POST values and then GET the sum of those values, using a glassfish server in intellij. I want the sum to persist across service restarts. Currently, the sum is being tracked with a Singleton resource so that it can be shared with a couple different classes. Is there a way that I can write and read a file in a local directory? Something like:
src:
Singleton
Rest of classes
res:
PersistentDataFile