I am working on a page for my employer and I need a little help if you don't mind :D
Right now there is an application running that sends a bunch of charcters to a JSP page when a button is clicked (that is the best description of that). What I do is grab those characters and create a new temporary file so the person who clicked the button can download it.
BUT this is my issue. The file is no longer temporary. The file will stick around until the JVM is killed. We don't restart our server that often, so the files just build up and stick around for a while.
I know I can create (or find) an application that watches the directory on the server and deletes file that are more than....say....20 minutes old, but I would like to know if anyone knows how to delete the files sooner.
Like, is there a way to delete the files when garbage collection runs or when the JSP session is closed?
I would recommend PowerToys just to remap a Copilot button on modern laptops for something more useful than Microsoft allows in Windows Settings. I also use some other tools like "Always on Top" and "Crop and Lock".
Why would you think Johny Ives is behind this ? he has not worked at Apple or on a smart Phone or Phone in general for long time On 27 June 2019, Apple announced that Ive would depart Apple after 27 years
did you not read this line . The Trump Organization, spearheaded by President Trump's sons, Donald Trump Jr. and Eric Trump
This by his sons Trump himself
Question
jon419
I am working on a page for my employer and I need a little help if you don't mind :D
Right now there is an application running that sends a bunch of charcters to a JSP page when a button is clicked (that is the best description of that). What I do is grab those characters and create a new temporary file so the person who clicked the button can download it.
Here is what I do:
Everything works GREAT. Yippy, I am happy...
BUT this is my issue. The file is no longer temporary. The file will stick around until the JVM is killed. We don't restart our server that often, so the files just build up and stick around for a while.
I know I can create (or find) an application that watches the directory on the server and deletes file that are more than....say....20 minutes old, but I would like to know if anyone knows how to delete the files sooner.
Like, is there a way to delete the files when garbage collection runs or when the JSP session is closed?
Thanks Neowinians, you all rock! :)
Link to comment
https://www.neowin.net/forum/topic/474685-java-delete-temporary-files-when/Share on other sites
1 answer to this question
Recommended Posts