3zl project :
target : use the scripted HTML with form to download file to target dir using apatche.commons.HTTPClient


HTML code : ( as text wihtout HTML formatting !)
form method="POST" name="upload1" action="$SCRIPT_NAME" enctype="multipart/form-data"
input type="hidden" name="action" value="upload"
nput type="file" name="uploadfile" size="50" maxlength="$MaxDwnl" accept="*.*"/
input id="form_submit" type="submit" name="submit" value="target"
input type='hidden' name='upfilename' value="target"
/form


--------------------------------
JAVA Code snippet:
import org.apache.commons.httpclient.*;
........
.......
try {
mPost.addParameter("uploadfile", f1); // FORM type="file" name='uploadfile' .....
} catch (FileNotFoundException e2) {
e2.printStackTrace();
}
mPost.addParameter("upfilename","X/"+f1.getName());
mPost.addParameter("action","upload");

downloads file f1 to dir /X

*fin





comments welcome