开发者

Uploading an image with JSP in Tomcat

开发者 https://www.devze.com 2023-03-15 11:25 出处:网络
I am having trouble uploading an image with JSP in Tomcat. I had some old code, but th开发者_如何学Goe packages seem to be deprecated now or whatever.

I am having trouble uploading an image with JSP in Tomcat. I had some old code, but th开发者_如何学Goe packages seem to be deprecated now or whatever.

Is there some tutorial for that.


If you want to do it with FileUpload in Apache Common... There user guide is a good place to start. http://commons.apache.org/fileupload/using.html

But there is an easy way to upload files to the server side. You can download the code from here. http://dl.dropbox.com/u/22048850/com.rar

try {
           com.tutetree.upload.manager.UploadManager up  = new com.tutetree.upload.manager.UploadManager(request);
           out.print(new String(up.getDataBytes()));
        } catch (Exception e) {
        }

But if you want additional functions the best option is to use the FileUpload in Apache Common

Hope this helps ^^

0

精彩评论

暂无评论...
验证码 换一张
取 消