This week's book giveaway is in the General Computing forum.
We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line!
See this thread for details.
The moose likes Struts and the fly likes How to preview uploaded image before inserting into the database Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Frameworks » Struts
Reply Bookmark "How to preview uploaded image before inserting into the database" Watch "How to preview uploaded image before inserting into the database" New topic
Author

How to preview uploaded image before inserting into the database

v sat
Greenhorn

Joined: Sep 13, 2007
Posts: 7
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,


Venkatesan Sathiamurthy PMP
Lorand Komaromi
Ranch Hand

Joined: Oct 08, 2009
Posts: 276
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..?


OCJP 6 (93%)
Ankit Garg
Saloon Keeper

Joined: Aug 03, 2008
Posts: 9191
    
    2

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


SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
v sat
Greenhorn

Joined: Sep 13, 2007
Posts: 7
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.
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: How to preview uploaded image before inserting into the database
 
Similar Threads
Need a basic Image Gallery
Preview image through XML Schema
Manipulating images
Reading an Image
how to know the last auto-increment number using JDBC