George Kastrinis
George Kastrinis

Reputation: 5182

Uploading an image with JSP in Tomcat

I am having trouble uploading an image with JSP in Tomcat. I had some old code, but the packages seem to be deprecated now or whatever.

Is there some tutorial for that.

Upvotes: 1

Views: 4838

Answers (1)

Chan
Chan

Reputation: 2641

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 ^^

Upvotes: 1

Related Questions