Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

File upload in Struts

 
Abubacker Siddik
Ranch Hand
Posts: 90
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys,

I want to upload a file using struts. I can use file upload in struts. But i dont know how to save it in backend database. How to convert it to store in the database... Help me out.

Abu.A
 
Joe Ess
Bartender
Posts: 9298
10
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Abubacker Siddik wrote:But i dont know how to save it in backend database. How to convert it to store in the database... Help me out.


So your question is not about Struts, it is about how to store binary data in a database? Try searching for "blob" (Binary Large OBject). Storing large amounts of binary data in a database is frowned upon in general. Databases are designed for storing and querying relational data. File systems are designed for storing binary data.
In any case, I'll move this post to the JDBC forum.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic