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