Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to preview uploaded image before inserting into the database

 
v sat
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
I have JSP/Struts page where I upload an image along with product information. after upload I want to preview product info including the uploaded image. I am finding trouble in getting the image for preview on the preview screen.
Thanks,
 
Lorand Komaromi
Ranch Hand
Posts: 276
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
v sat wrote: I am finding trouble in getting the image for preview on the preview screen. ,


How did you try it, what didn't work..?
 
Ankit Garg
Sheriff
Posts: 9519
22
Android Google Web Toolkit Hibernate IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please TellTheDetails. You can upload the image to a temp directory and in the rendered preview JSP page you can give the path of the image in the temp folder in the img tag...
 
v sat
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am using Google App Engine. I can't save images on physical folder in app engine.
What I am doing is, I have an action class with the property named photo of type String. I am using file-uploader to upload the image and save it in the photo variable as string
and at the same time open the image in the new window.




My requirement is to show the image along with the other product information. Not just the image in new window.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic