[英]how to receive file in java(servlet/jsp)
hi i am making communication protocol. 嗨,我正在制定通信协议。 on my web server i send one file with curl(in c# POST HTTP Request).
在我的Web服务器上,我发送一个带有curl的文件(在c#POST HTTP请求中)。 this task is been successfully done.
此任务已成功完成。 how should i receive this file with java on my web server i gone through this article .
我应该怎么得到我的Web服务器上使用Java这个文件我走过了这篇文章 。 but its about file downloading.
但有关文件下载。 i just want to receive file with java.
我只想用Java接收文件。
该链接可能会帮助..您必须提供multiprt表单数据。.http ://www.journaldev.com/2122/servlet-3-file-upload-using-multipartconfig-annotation-and-part-interface
Get InputStream from HttpServletRequest InputStream inputStream = request.getInputStream(); 从HttpServletRequest获取InputStream InputStream inputStream = request.getInputStream(); and then read bytes from it till EOS
然后从中读取字节直到EOS
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.