once after selecting the filename and submit the form the firefox is sending only the filename without the full path. for eg: if i select a file c:\text.htm the firefox is returning just text.htm as parameter. Is there a way to pass the full path as parameter. In IE it is working fine.
I do not think firefox returns the fill path as a security measure.
what are you doing on the server to try to get the full path?
Joined: Aug 23, 2005
user should select a xml file from browse button and the server will parse the xml file and update the database accordingly. since firefox is returning just filename the servlet is not able to get the xml file
Originally posted by vijaya bacina: since firefox is returning just filename the servlet is not able to get the xml file
You should not need the file path in any case. How are you reading the file, with file I/O or with a file upload?
If the former, your system will ONLY work when the client and the server are on the same machine. Is this what you really intened?
Joined: Aug 23, 2005
where path=document.form.browse.value; which is equal to text.xml file.exists() is returning false so not able to read the file. the server and client will be on different machines. Is this not possible with firefox atall?
Firefox has nothing to do with it. If that code you posted runs on your server, then the File object refers to a file on your server, not to a file on the client. That just isn't how you upload a file, so there is no point in trying to make it work.
Hi guys, I have a similar problem, which is not solved by the JSP FAQ...
In our case we are not trying to upload the file, just allow users on our intranet to specify where their file is, and using the Browse button avoids mistypes... it's part of an application where users specify future deployments, and this is part of the documentation they are providing. So we are not (at this stage) interested in the file, only where it is. So, as much as I understand that the primary function of the Browse button is for uploads, Firefox's behaviour is kind of unhelpful.