473,394 Members | 1,813 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

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 4094
r035198x
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
r035198x
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
r035198x
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

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

Similar topics

1
by: Beryl Small | last post by:
I have a web application in Visual Studio.Net 2003. On the click event of a button on my .aspx page, I use the following FileCopy SourceFile, DestinationFil the Sourcefile is on a mapped drive...
0
by: Oleg Ogurok | last post by:
Hi all, I have a C# class library project that needs to be registered for COM interoperability. I set the "Register for COM Interop" to true in the project's properties. When compiled, VS.NET...
2
by: Noozer | last post by:
The following javascript code generates an "Access denied" error at the indicated line. This sample should allow the user to click "Browse" and choose a file. Once the user has selected a file...
5
by: Mr Gordonz | last post by:
Hi all, I want to put a button on a page, and when the user clicks it, the standard Windows "Open File" dialogue box opens, and the user can browse/select a file on their PC. Having selected a...
2
by: HVG | last post by:
Hi, does anyone know why using ".click()" on a <INPUT type="file"> control should be a problem? - the html file selction control is on a very plain webform page with just the <input type="file">...
2
by: OutdoorGuy | last post by:
Greetings, I have a "newbie" question in relation to opening files from C#. I have a Windows form where I allow the user to type in a file extension in a text box (e.g., "xls"). I then take...
2
by: trint | last post by:
With the following code, I get the "message" whether or not there is content in my filefield: function check_file_field() { var file_field = document.getElementById("custCartFile");...
3
kickingthehabbit
by: kickingthehabbit | last post by:
Hi All new to all of this I just downloaded reactor server. everything works fine except Mysql - SQL import files. I am trying to import file createdb.sql I open DB and try and import with...
1
by: sandeep kumar shah | last post by:
Hi, We have used a file uploading HTML tag in an HTML page. We need to customize the text displayed on the Button (which is by default “Browse…” for internet explorer). Below is the...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.