By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
464,340 Members | 1,125 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 464,340 IT Pros & Developers. It's quick & easy.

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

P: 4
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
Share this Question
Share on Google+
6 Replies

10K+
P: 13,262
I *think* that your session is expiring. Check the session expiry limit.
Mar 4 '09 #2

P: 4
No,it has definately got nothing to do with the session coz other links from the same application works fine.
Mar 4 '09 #3

10K+
P: 13,262
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

P: 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

10K+
P: 13,262
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

P: 4
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.