jQuery in Action, 3rd edition
The moose likes JSP and the fly likes Upload image to server using JSP Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Head First Android this week in the Android forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Upload image to server using JSP" Watch "Upload image to server using JSP" New topic

Upload image to server using JSP

kenji jonathan

Joined: Oct 07, 2011
Posts: 4

Hi friends, I want to ask, how to upload image to server using JSP?...thanks.
Paul Clapham

Joined: Oct 14, 2005
Posts: 19691

Don't use a JSP. The purpose of a JSP is to generate output in a text format, usually HTML. Clearly that purpose doesn't encompass uploading files. You should use a servlet to do that.

And the easiest way to do it in a servlet is to use the Apache File Upload package.
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63052

See the JspFaq for more info.

And Paul is correct, Java code in a JSP is nothing short of irresponsible at this stage.

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
I agree. Here's the link: http://aspose.com/file-tools
subject: Upload image to server using JSP
It's not a secret anymore!