Re: Weird behavior in WO
Re: Weird behavior in WO
- Subject: Re: Weird behavior in WO
- From: Frank Stock <email@hidden>
- Date: Tue, 7 Nov 2006 20:39:29 +0100
Hi Chuck,
It is the same in developer-mode as in deployment-mode. It is the
same routine in WO that puts the their first and then overwrite it
with the new one (and that doens't happen)
Op 7-nov-06, om 20:31 heeft Chuck Hill het volgende geschreven:
By "within WO" do you mean when the application is deployed? It
sounds like a permissions problem for the user that the application
is running under. When you are debugging, it is running under a
different user.
Chuck
On Nov 7, 2006, at 11:24 AM, Frank Stock wrote:
Hello,
I don't think this is directly a problem of WO. I did test this in
pure Java and this routine is working fine, we do a copy of a
file, overwriting another file.
But within WO, the old file is not overwritten and we don't get an
error or exeption, strange thing is: if we do this in debugging
mode, step-by-step it works the file is replaced.
public static boolean copyFile (String srcpath, String destpath) {
File src = new File(srcpath);
File dest = new File(destpath);
try {
InputStream in = new FileInputStream(src);
OutputStream out = new FileOutputStream(dest);
// Transfer bytes from in to out
byte[] buf = new byte[1024];
int len;
while ((len = in.read(buf)) > 0) {
out.write(buf, 0, len);
}
in.close();
out.close();
return true;
} catch (IOException e) {
NSLog.debug.appendln("DEBUG:"+e.getMessage());
return false;
}
}
Thanks,
Frank Stock
NSS production
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40global-village.net
This email sent to email@hidden
--
Practical WebObjects - for developers who want to increase their
overall knowledge of WebObjects or who are trying to solve specific
problems.
http://www.global-village.net/products/practical_webobjects
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden