To run it "pseudo" locally (like on a command-line), you should first deploy it and then use HttpClient to connect to your server. That way you can interact with your servlet/jsp from the command line and not have to submit forms with file attachments
Sample code [You can certainly get more creative than that]
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.IOException;
import org.apache.http.HttpResponse;
import org.apache.http.client.HttpClient;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.client.methods.HttpUriRequest;
import org.apache.http.entity.mime.MultipartEntity;
import org.apache.http.entity.mime.content.FileBody;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.client.ClientProtocolException;
public class FileUploaderClient {
/**
* @param args
*/
public static void main(String[] args) throws ClientProtocolException, IOException{
HttpClient httpclient = new DefaultHttpClient();
HttpPost httppost = new HttpPost("http://<app-version>.<app-name>.appspot.com/<servlet-name>");
MultipartEntity reqEntity = new MultipartEntity();
FileBody bin = new FileBody(new File("<File you want to upload>"));
reqEntity.addPart("file", bin);
httppost.setEntity(reqEntity);
HttpResponse response = httpclient.execute(httppost);
System.out.println(response.getStatusLine());
}
}
Now you would have the ability to call your servlet in a loop for example instead of submitting your form multiple times