ProgressObject po = mgr.distribute(targets, rarFile, tempFile);
po.addProgressListener(new ProgressListener() {
public void handleProgressEvent(ProgressEvent event) {
DeploymentStatus status = event.getDeploymentStatus();
String msg = status.getMessage();
if (status.isCompleted()) {
response.setRenderParameter("successMsg", msg);
} else if (status.isFailed()) {
response.setRenderParameter("errorMsg", msg);
}
}
});