I'm using GWT widget to upload my files, I'd like to upload them under tomcat folder on Ubuntu server, so I need to set the param value for this piece of code in web.xml:
<context-param>
<description>Location to store uploaded file</description>
<param-name>file-upload</param-name>
<param-value>
...
</param-value>
</context-param>
If I try to set http://ip.ip.ip.ip:8080/var/lib/tomcat7it returns UploadActionException and e.getMessage()="http://ip.ip.ip.ip:8080//var//lib//tomcat7".
It seems that Eclipse try to search this path in my Window filesystem. Any ideas to resolve this? Thanks.
http://ip.ip.ip.ip:8080/var/lib/tomcat7 is not the same thing as /var/lib/tomcat7 on your server. To use that as the upload directory put this init-param in your upload servlet declaration in web.xml
and then in the upload servlet build a path string starting with
then write the FileItem to a file like this
All of this would require the whole directory /var/lib/tomcat7 to be writable by whatever user tomcat is running under which is a bad idea. But there you have it.