• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

upload & display image in jsp

 
Greenhorn
Posts: 8
Eclipse IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I need to upload & display image through jsp, please anyone of you can show me how to implement it? .I don't use a database for this and i need to save image in a folder and shoud be implemented as jsp not as servlet.
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

suppa ja wrote:I need to upload & display image through jsp, please anyone of you can show me how to implement it?


See the ServletsFaq for information on file uploads.

shoud be implemented as jsp not as servlet.


No, it should not. JSP is for presentation. Your file uploads needs to be handled by a servlet.
 
Steiphan Jason
Greenhorn
Posts: 8
Eclipse IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
then please show me how to perform that using servlet ,through a java bean program is also fine. I kindly request your help :)
 
Bear Bibeault
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Have you read the ServletsFaq as suggested? Do you have specific questions?
 
Steiphan Jason
Greenhorn
Posts: 8
Eclipse IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
yes, there is only one constraint program should have,that is to verify the uploading file is only a picture with.jpg or .png and not any type of document like .txt or .docx. File should be saved in folder of server with the name we assign,not the uploading picture's name as it is.
 
reply
    Bookmark Topic Watch Topic
  • New Topic