hello Ulf,
Thanks for your help so far, i was able to remove the SSO from the my upload jsp, and so i can see my post methos hitting this jsp on the server. But now i have this problem of contentType =null, i get this output from my jsp whenevr i try to hit it. Any advice what am i doing wrong:
ERROR :
E SRVE0026E: [Servlet Error]-[the request doesn't contain a multipart/form-data or multipart/mixed stream, content type header is null]: org.apache.commons.fileupload.FileUploadBase$InvalidContentTypeException: the request doesn't contain a multipart/form-data or multipart/mixed stream, content type header is null
HTTPCLIENT CODE ;
public static void writeToServer(
String imageFile) throws IOException {
HttpClient client = new HttpClient();
File f = new File(imageFile);
PostMethod filePost = new PostMethod("http://devserver/temp/ProcessFileUpload.jsp");
Part[] parts = {
new StringPart("param_name", "value"),
new FilePart(f.getName(), f)
};
filePost.setRequestEntity(
new MultipartRequestEntity(parts, filePost.getParams())
);
int status = client.executeMethod(filePost);
FileUplaod.jsp code :
System.out.println("Content Type ="+request.getContentType());
FileItemFactory factory = new DiskFileItemFactory();
ServletFileUpload fu = new ServletFileUpload (factory);
fu.setSizeMax(10000000);
List fileItems = fu.parseRequest(request);
Iterator itr = fileItems.iterator();
I just get the exception on the parseRequest as contentType is null
Thanks,