write file to a directory

hello

I want to write a file to a directory in the same server.how can i do this?
should i use java service to accomplish this?

thanks
uk

Yes, you need to create a Java service to perform it. Inside (basied parameters checking and error handling) place such or similar code:

File f = new File(variable_filename);
FileOutputStream fos=new FileOutputStream(f);
synchronized(mutex){
fos.write(variable_fileContentAsBytes);
}
fos.close();

Or if you have and FTP server just use pub.client.ftp services to place file in target folder.

HTH

thanq