Thanks Bear,
May be my doubt is not clear to you.
path is given to a File object. In the prior one, i got FileNotFoundException.
and the latter one did work out. how it worked i don't know.
You quoted that:
getRealPath() is useless because it returns the file system path to the file. This has little to nothing to do with the URL.
File object requires total path and getRealPath() gave it.Thanks for this.
And another one.
how to make my prior one to work. I'm getting FileNotFoundException. how to resolve.Please give suggesion.
I used apache fileupload jar file.Used FileItem to write the file to uploadedfiles folder.
Thanks
vipul kumar