Uploading an image with JSP in Tomcat
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 ^^
精彩评论