Reading and writing images in Database.

  • Thread starter getsanjay.sharma
  • Start date
G

getsanjay.sharma

Hello to all Java programmers out there.

I am currently writing a web application which allows the user to
upload files on the server as their avatar. I am using JBoss 4 as my
application server, Java 1.5, MS Access as my DB (if you would be kind
enough to call it that) and Apache commons FileUpload module.

I have been successful in saving the file to the disk at an absolute
location (c:/photos) but am at a loss on how to save it to my projects
'image' folder i.e. the path relative to my application root
directory. I have a folder 'image' in the application's root directory
but am unable to store the file at that location. I tried various ways
of obtaining the path but to no avail. Also since I am using WAR files
for running project, I have to enter the image in the WAR file but
have no idea on how to do that.

I would really appreciate if someone would lend me a helping hand in
this situation.

Thanks and regards,
S T S.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top