I had the same requirement to just retrieve the original (client side) file location and not the file itself. This was because I develop strictly for an Intranet (and not trying to get peoples file names unwillingly or anything) and the users had mapped drives to the same shared server. One use would fill out a request asking where a specific file was located on the mapped drive and the other user would fill out a form with the file name only but it was convenient to browse to the file for accuracy. Any these files could literally be a gig in size.
With those requirements it meant that the best way was to browse to the file and return only the full path name to the Web/Container server not necessarily the whole file. I assume that is what you want to do? This is what I did: I created two forms on the JSP page. One was a "dummy" form and the other the real form. The real form was nothing but hidden fields. The submit button for the "dummy" form (the form you could actually see) was not a submit but a button and it went to a JavaScript method with then did a copy. JavaScript function contents: function submitReal(form1) { form2 = document.forms[1]; form2.personName.vaule = form1.personName.value; form2.file1Name.value = form1.file.value; ... form2.submit(); } Where form2.file1Name was of type html:hidden and form1.file1 was of type html:file. I hope this helps. -----Original Message----- From: Daniel Massie [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 06, 2003 11:43 AM To: Struts Users Mailing List Subject: RE: uploadfile path its only the original file's location that i require, i can't find any mention of how to aquire this in any online articles. -----Original Message----- From: Dan Tran [mailto:[EMAIL PROTECTED] Sent: 06 August 2003 16:24 To: Struts Users Mailing List Subject: Re: uploadfile path Folow the Struts upload example, you can trace thru how Struts gets the client file and upload to server where you have to do extra work to copy data from FormFile (its stream buffer) to the your choice of server location. -Dan ----- Original Message ----- From: "Yansheng Lin" <[EMAIL PROTECTED]> To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]> Sent: Wednesday, August 06, 2003 8:18 AM Subject: RE: uploadfile path > <html:form method="POST" enctype="multipart/form-data"> > <html:file property="theFile" /> > </html:form> > > theFile is type of FormFile. You can go from there. > > -----Original Message----- > From: Daniel Massie [mailto:[EMAIL PROTECTED] > Sent: August 6, 2003 2:35 AM > To: Struts Users Mailing List > Subject: uploadfile path > > > I am trying to upload a file using html:file which is received as a > FormFile, the problem is I need to find out this files absolute path. Hwo > can I retrieve this information? > > Thanks > Daniel > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]