0
我知道它没有任何意义调用的servlet doPost方法从img标签的src:我们可以从img tag src调用servlet的doPost方法吗?
<img src='/ServletName' alt=''/>// i know it will call doGet or service method but i can't use these.
那么,有没有办法调用的doPost从IMG标签img的HTML和显示图像的标签的方法?
其实我的doPost方法响应类型是:
response.setContentType("image/jpeg");
还对服务器的磁盘I不能存储图像。
如果您使用HTTP POST方法提交表单,则会调用它。 –
发布是将数据发送到服务器。你试图做的奇怪的事情绝对是一个'get'。图像必须永久存储在某个地方?除非你动态生成它... – MarioDS
感谢您的评论,所以我想答案是不是我的问题。 – user460293