Communication between Signed Applet and server side Controller

Deadly 提交于 2019-12-06 21:58:28

Need more details...

Just some suggestions...

What is the Part object is?

If you want to upload file by 'parts' I may recommend just to override MultipartEntity writeTo method to upload big file instead of using arrays or maybe it is not the thing?

Concerning the cast... I may guess that line may cause the problem

MultipartHttpServletRequest m = (MultipartHttpServletRequest) request;

As a rule HttpClient is working in pare with FileUpload lib. So why not to use it instead?

And one more thing... you point the content mime as text/xml but is it xml especially if it is a bin file part? Shouldn't it be some kind of application/octet-stream instead ?

Anyway, that would be more helpful you to provide more details in your question

I got the solution for that problem. here what I have changed in my existing code

My Signed Applet:

MultipartPostMethod mPost =  new MultipartPostMethod(uri);      
mPost.addParameter("Filedata", f.getName(), f);
client.executeMethod(mPost);

Now its working fine.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!