in my project i am currently using direct links, these store specific files that get uploaded to the server, these locations are all in the folder of the project (fileupload
Just make it externally configurable. There are various ways to achieve that.
Set an environment variable during server startup.
SET UPLOAD_LOCATION=C:\path\to\uploads
It's available as follows:
String uploadLocation = System.getenv("UPLOAD_LOCATION");
Set a VM argument during server startup.
-Dupload.location="C:\path\to\uploads"
It's available as follows:
String uploadLocation = System.getProperty("upload.location");
Set it as a properties file entry.
upload.location=C:\path\to\uploads
It's available the usual Properties API way:
String uploadLocation = properties.getProperty("upload.location");
The location of the properties file itself is actually a whole question at its own, which is already answered here: Where to place and how to read configuration resource files in servlet based application?
Either way, you can easily reference the files as follows:
File some = new File(uploadLocation, "some.ext");