Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

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!

Full file Path when using FormFile in struts

843838Oct 10 2006 — edited Oct 10 2006
hi,

i am uploading an excel file. All is doing fine but whatever file is selected by user by clicking the browse button, its does not retreive full path it retreives only the file name selected......

JSP page
<html:form action="uploadFile.do" method="POST" enctype="multipart/form-data">
	<html:file property="fileName" title="Browse" />
	<html:hidden property="methodtoinvoke" value="uploadFile" />
	<html:submit value="submit" />
</html:form>
when i retrieve this filename and convert it to String its only shows file name and not the full path, as a result it always pick this file name from the current working directory.

how can i get the selected file path ????
Pls help
thanx
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 7 2006
Added on Oct 10 2006
1 comment
250 views