This week's book giveaway is in the Jython/Python forum.
We're giving away four copies of Murach's Python Programming and have Michael Urban and Joel Murach on-line!
See this thread for details.
Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Upload image to server using JSP  RSS feed

 
kenji jonathan
Greenhorn
Posts: 4
Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi friends, I want to ask, how to upload image to server using JSP?...thanks.
 
Paul Clapham
Sheriff
Posts: 22185
38
Eclipse IDE Firefox Browser MySQL Database
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Marshal
Posts: 65824
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
See the JspFaq for more info.

And Paul is correct, Java code in a JSP is nothing short of irresponsible at this stage.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!