469,641 Members | 1,106 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,641 developers. It's quick & easy.

Getting access denied error while importing file using input type="file" with IE7

Hi All,
I am using struts application wherein I need to import file for some purpose.I have used input type="file" for the same which goes like:
<input type="file" id="uploadFile" name="uploadFile" size="50">
I have the import button on which I have used onClick event to call javascript function submitValues() used to validate all the fields from the page which goes like:
<input type="button" name="select" value="Import" class="CSSButton" onClick="javascript:submitValues();">
The JS function then in turn submits the form and calls the action.The problem is sometimes even when the correct path is specified for the file to be imported results in access denied error.This error comes sometimes and other times it works fine.But when this error comes,I need to relogin into the application and then it works fine.
Any idea why I am getting access denied error while importing? Has it got something to do with IE7 version or with the input type="file" which is being used here?
Thanks for any help if anyone can provide.
Mar 4 '09 #1
6 3754
13,262 8TB
I *think* that your session is expiring. Check the session expiry limit.
Mar 4 '09 #2
No,it has definately got nothing to do with the session coz other links from the same application works fine.
Mar 4 '09 #3
13,262 8TB
Do you handle the file upload on the server using apache's file-upload package?
Are you uploading the file to a database or to a filesystem?
Mar 4 '09 #4
Basically,I am using this upload file(either .csv or .xls) to insert records into postgres database. I have used commons-fileupload-1.0.jar for the same along with all required jars for POI library.
Mar 4 '09 #5
13,262 8TB
So the file gets uploaded to some folder on the filesystem and you then read it to extract the values you want for the database?
Well you need to make sure of course that you always have permission to the location where the file is stored temporarily.
Does your log in do anything special like resetting permissions e.t.c?
When you said the other links work, do you mean that they work at the same time that you are getting the access denied page on the page with the input=file? Do those pages require you to be logged in to access them?
Mar 4 '09 #6
Yes,they work at the same time when this error occurs.Also,the folder permission has no issues at this particular case.This issue doesn't come up always but comes at some times. So,it's not easily reprodicible as well.
Mar 4 '09 #7

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

1 post views Thread by Beryl Small | last post: by
5 posts views Thread by Mr Gordonz | last post: by
2 posts views Thread by OutdoorGuy | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.