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="uploadFil e" 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="CSSButto n" onClick="javasc ript:submitValu es();">
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.
6 4133
I *think* that your session is expiring. Check the session expiry limit.
No,it has definately got nothing to do with the session coz other links from the same application works fine.
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?
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.
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?
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.
Sign in to post your reply or Sign up for a free account.
Similar topics |
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 (s:\) on the server it returns the error "File not found" even though the file is there. The same code in the same place works fine if the file is on the c:\ drive. Same code also works fine with the mapped server drive in .NET if a put it in a...
|
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 creates a .tlb file under
obj/Release or obj/Debug, depending on the current configuration.
I also have a deployment project that uses the "Primary Ouput" of the class
library. The problem is that every time I launch VS.NET and try to build the...
|
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 the form is automatically submitted. I'm trying
to avoid having seperate browse and submit actions.
Can someone explain why I'm getting the error and how I can accomplish this
task?
|
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 file, the user clicks Open, and I then
want to capture the file path and name in a string variable. Finally, I
want to upload the file to the server.
BUT: I don't want to use an <input type="file"> control.
|
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"> control and a submit button.
- the ".click()" method is simply used to automatically open the file
selction dialog box so the user doesn't have to click "Browse". (likewise
the form is automatically submitted when the user selects a file).
The...
| |
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 that extension and use that as my
filter criteria for the File Open dialog.
Once the user selects a file with that extension (from the File Open
dialog), I simply want to open that file (whether it is an .xls file,
.txt file, etc.). I am...
|
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");
if(file_field.value.length == 0)
{
alert("You are required to select an Image");
return false;
|
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 SQL
when I try and import it comes back with
|
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 code we have used:
CODE:
<input type="file" style=" width:100%" id="importFile" name="importFile"/>
As per our analysis we got two methods but none is satisfactory. Please let us know if there is any other way out
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |