• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to store a file/image into oracle database and display the image from database on browser using

 
vishnu ambati
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I want to store an image/file into oracle database using jsp.
I have written code to store data when am running in my machine it is working fine, but not working in server throwing an error saying that "The system cannot find the file specified."
I am attaching the code what am written.
If you could help me here,it would be great.
Thank you in advance.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65519
105
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch.

vishnu ambati wrote:Hi,
I want to store an image/file into oracle database using jsp.

No, you don't. JSP is for rendering the view. Your database code should be in Java classes, not a JSP. In fact, a JSP should have no Java code in it at all.

I have written code to store data when am running in my machine it is working fine, but not working in server throwing an error saying that "The system cannot find the file specified."

Well, then it's not working fine, is it? Be specific, Post the exact error message and the code where it is occurring. Please read TellTheDetails.

I am attaching the code what am written.

No, you didn't. Please be sure to UseCodeTags when you do.
 
vishnu ambati
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Bear Bibeault ,

Is there any way to store an image into databse.
can't we upload an image to server and after upload can we store an image/file to database?
You are right, but i have to use jsp code only.Is there any way to solve this issue?

Thanks,
Vishnu.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65519
105
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
vishnu ambati wrote:Is there any way to store an image into database.

Sure. But JSP isn't the right way to do it. That should be down in a Java class and is a question for the JDBC forum.

can't we upload an image to server and after upload can we store an image/file to database?

Yes, as I said above.

You are right, but i have to use jsp code only.

Why? It is no longer acceptable for there to be code in JSP pages,

 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!