This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
the above code is inserting image....i don't know the above code is right or not.. but it insert record in table;
It inserted a record alright, but not with the image. You gave the record two values: a 1, and the file length. That's two integer values, not the image itself. I said you should use a PreparedStatement; I don't see any.
I was thinking about the following:
Don't forget to close() fis, preferably using a try-finally block.
Joined: Apr 07, 2010
I have done code for inserting image as per your instruction...
now what to do for retriving image on JSP..
what to write in Action Class to retrive image and On jsp page...??
hey Rob i have one question.....
before doing this i have tried for storing image on local disk....
it is working on my machine perfactly....
but when i am accessing from another machine the image is not coming.... then i got solution like on another machine first i have to access my machine from RUN....then i gave username/password for my machine .
and on my machine i have put folder of image in shared.
then it will allow and work perfactly...
but this solution is not good there for i am moving for storing image in database...
is there any posibility to access image from local disk without accessing (from RUN) my machine from client machine..?
and one thing is that i am working on windows environment... where as my deployment server is linux environment..
i am using jboss-4.0.4RC1 application server..
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
subject: how to store/retrive image in oracle database using struts 1.2