My Tomcat instance is sitting on a drive with little remaining space. The application I'm running does move file uploads off the server and into a NAS. During the upload, however, Tomcat keeps this file locally, presumably in the /temp directory.
My server has a second data drive with plenty of space where I'd like to relocate this temp directory to. How can I configure Tomcat so that it uses a temp directory on this other drive, ie. how can I relocate this directory?
Edit: I'm running Windows server 2k3. I tried setting the CATALINA_TMPDIR env var, but Tomcat appeared to ignore it.
Solution: I'm using the "Monitor Tomcat" application which passes
to the JVM. This was overriding the environmental variable I was setting. You can find it under Java > Java Options
Changing this has fixed my problem.