Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

how to get the complete path name when uploading a file from servlet

750025Mar 24 2010 — edited Mar 24 2010
Hi,
I write a servlet to upload a file from html page
<intput type=file name=fileupload>
I am using
import org.apache.commons.fileupload.
to upload file. i want to get the all fields in the form and file name and content of the file also.
It give the file name only
String filename= fileItem.getName(); 
o/p krish.jpg
But i want complete path naem like
d:/krishna/images/funny/krish.jpg
I serach the API org.apache.commons.fileupload.*
But i did nt find the method to get it.

plz help me , which api or method to use here..
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 21 2010
Added on Mar 24 2010
5 comments
1,935 views