Unable
To find the 'struts. multipart. savedir' struts2 File Upload error Solution
From http://www.itzhai.com/unable-to-find-struts-multipart-savedir-struts2-upload-file-error-solution.htmlThis article was published by Arthur King in 274
I wrote the original itzhai.com article a few days ago. I have not commented on this article yet.
Watched 2,243 views +
This error occurs when you upload files in a struts2 project:
2011-7-30 20:29:02 COM. opensymphony. xwork2.util. logging. commons. commonslogger info: unable to find 'struts. multipart. savedir 'Property setting. defaulting to javax. servlet. context. tempdir2011-7-30 20:29:02 COM. opensymphony. xwork2.util. logging. commons. commonslogger info: removing File Upload F: \ software_programming \ project \ source code \. metadata \. plugins \ Org. eclipse. WST. server. core \ tmp0 \ work \ Catalina \ localhost \ musicalinstrumentsstore \ upload _ 365daacc_1317af78b8c _ 7ffe_00000001.tmp
The reason is that the folder for storing temporary files is not set, and Struts. multipart. savedir in the error prompt is to set the properties of the Temporary Folder and write the configuration to the struts. properties file, as shown below:
struts.multipart.saveDir = /tmp
If this folder does not exist, Struts 2 will automatically create one.
You can also add a constant setting in the Struts. xml configuration file: (this method is recommended)
<constant name="struts.multipart.saveDir" value="/tmp"></constant>