No, the absolute path is not available and also completely irrelevant to
a web application because the absolute path as seen by the client who
uploaded the file may or may not be the same to another client who looks
at the uploaded data. Again, this is due to how file uploads via HTTP
work. The browser simply does not supply the information about the
absolute path, so the web application is unable to display this
information. The only way you would possibly get this kind of
information would be a java applet, but this is way off topic for this list.
Robert
elyes sallem wrote:
OK, thanks for your response
if i understood well, there is no way to initialize the displayed path (the
problem is that the client want a default value, which must be display and
if the client make sumbmit i must make trt with it)
furthermore ,in the trt, i want the absolute path which i give as parameter
to other function
but in the formFile, i find only getFileName(), which gives only the name ,
not the absolute path
have you an idea how can i get the absolute path?
Regards
Elyes
2008/12/11 Robert Graf-Waczenski <[EMAIL PROTECTED]>
Hi,
short answer: This is not possible. This restriction is not imposed by
Struts but is instead due to a restriction of the <input type="file"> html
tag, for which the value can not be prefilled or changed programmatically.
In our app we therefore have the pattern that when a file is currently
already uploaded, then we have a readonly display of the file name and other
statistics plus a link that reads "upload new file" (or something similar).
This link opens our upload page which the user can then use to upload the
file. Then the system goes back to the original page with the new file's
details.
HTH,
Robert
elyes sallem wrote:
Hello,
in a form, a define a <html:file
and i defined a form file as property
i wanna initialise the path and display it in first access
i have the value of the path by default
i will initialise it in the default constructor of the actionForm
but i don't know how affect a path to FormFile
assume that the property is
FormFile scopeFile
and the default path is, c:\dev\scope.cvs
how can i initialise scope to this path?
Thanks in advance
Elyes
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]