Paul,
I believe the location in the setting will be cleaned and only that location, if you move it with the code below, Cocoon/Tomcat _should_ be unaware of the new location.
Perhaps it has to do with your deploy method, I believe when deploying using the manager webapp in Tomcat, it recreates the webapp every time you restart Tomcat somewhere under the work directory, but i'm not sure about the precise mechanism
cheers, Gertjan
Paul Joseph wrote:
Actually Gertjan,
I can move it directly to any directory I choose by changing the upload setting in the Cocoon conf. file.
If I use the approach below and keep it in a directory that is still under the Tomcat heirarchy, I presume it will still be deleted - no?
thx Paul --- Paul Joseph <[EMAIL PROTECTED]> wrote:
---------------------------------------------------------------------Thank you very much Gertjan. Your solution is much simpler than what I was planning to do, and so I will use it instead of mine!
--- Gertjan Assies <[EMAIL PROTECTED]> wrote:
_sName);Hi,
I use the following simple code to move uploaded
files
It's called from the action which handles the
submitted form
the _sName here is extracted from the submitted
field value which contains the local path and the filename
private boolean moveFile(String _sName) {
boolean bResult = false;
File aInFile = new File(TEMP_PATH +
toif (aInFile.exists()) { File aOutFile = new File(DEST_PATH + _sName); bResult = aInFile.renameTo(aOutFile); } return bResult; }
Leszek Gawron wrote:
uploadedPaul Joseph wrote:
Thank you Grzegorz.
I would like to save it under the Tomcat
hierarchy....so that Tomcat can serve the
suggestfile to other users in the company.
That being the case, the other option that you
is to disable autoupload.
If I do this, will the upload widget continue
work?uploading)
(that is all I care about in terms of
ofFirst I think there is no such thing asautoupload. However if the
upload is being enabled in web.xml file then ifmultipart request
comes the request is automatically properlydecoded and made available
to the user. Query cocoon wiki for the way toobtain the access to
FilePart. You should copy the data into somestorage (filesystem,
database). I do not really remember the details
this mechanism. If
it persists temporary data to disk it will bedeleted after the
request has been processed.
---------------------------------------------------------------------To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
