0
我正在開發一個Web應用程序。而在應用程序中,我必須得到用戶-PC &的臨時文件夾的路徑,它的工作正常,但是當我在服務器上部署war文件時,它給了我服務器的臨時文件夾路徑而不是User-PC。但我的目標是獲取用戶PC 臨時文件夾路徑。 這是我用來獲取臨時文件夾: -如何獲取臨時文件夾路徑
String temppath=System.getProperty("java.io.tmpdir");
System.out.println("Temp path is "+System.getProperty("java.io.tmpdir"));
FileOutputStream fo = new FileOutputStream(temppath+"employee.ser");
ObjectOutputStream os = new ObjectOutputStream(fo);
請幫我