String home = System.getProperty("jboss.server.home.url");
URL home_url = new URL(home);
File home_path = new File(home_url.getPath(), "deploy");
FileUtils f = new FileUtils();
if (f.copy(path, home_path.getAbsolutePath()) == false)
{
throw new Exception(
"Error copying file to the J2EE deploy directory");
}
}