I want to upload file using struts framework. the request should be came from standalone application using HttpUrlConnection.
How can i write my struts(1.3) action code to handled Multipart form data. I used FormFile and is working fine with struts jsp (property file of FormFile). But not working with HttpUrlConnection.
However if i writter a Servlet and take input stream from request (request.getInputStream()) it works fine.
Is any one has solution please provide me.
Please visit the following link:
thanks for a quick reply....
but my major problem is with client request...how can i write a client code which is standalone application..
I have written code using java.net.URL and java.net.URLConnection .
In this case FormFile was not get set. so it send null pointer exception while formfile.getFile(); and also if i used request.getInputstream() is return 0 bytes.
what is another way to handled request stream in struts action or let me how the upload request is post to struts action.