Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 03-04-2009, 08:27 AM
Member
 
Join Date: Mar 2009
Posts: 3
Rep Power: 0
sarang1 is on a distinguished road
Default 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.
Bookmark Post in Technorati
Reply With Quote
  #2 (permalink)  
Old 03-04-2009, 06:35 PM
Steve11235's Avatar
Senior Member
 
Join Date: Dec 2008
Posts: 972
Rep Power: 2
Steve11235 is on a distinguished road
Default
Access denied by what? Your Web application server? I doubt that anything to do with your Javascript and what not, at least not directly.

Does your application require authentication by the Web server? If so, how are you doing the authentication?

I suspect, based on the sparse evidence, that your session is either timing out on the server or being lost because the session cookie is not being returned by IE.

Check your session timeout settings. You may simply be timing out the session too quickly, especially if you are dinking around on the browser with the file upload stuff. That is especially possible, given the intermittent nature of the problem.

Another possibility is that you are using multiple tabs or IE 7 browser windows. Each tab, or a browser window spawned by an existing window, shares the same cookies and thus the same session. If you ended the session in another tab, perhaps through another application on the same Web server, that would kill the session as well.

There are other possibilities as well. Try to replicate the problem, being very careful to keep track of what you did to cause it.
Bookmark Post in Technorati
Reply With Quote
  #3 (permalink)  
Old 03-05-2009, 11:11 AM
Member
 
Join Date: Mar 2009
Posts: 3
Rep Power: 0
sarang1 is on a distinguished road
Default
No,it has definately got nothing to do with the session coz other links from the same application works fine.They work at the same time when this error occurs.This issue doesn't come up always but comes at some times.So,it's not easily reprodicible as well.Also,I am using only one tab at a time.
Bookmark Post in Technorati
Reply With Quote
  #4 (permalink)  
Old 03-05-2009, 03:28 PM
Steve11235's Avatar
Senior Member
 
Join Date: Dec 2008
Posts: 972
Rep Power: 2
Steve11235 is on a distinguished road
Default
OK, what application (IE7, the Web server, etc.) is generating the message, and what does the message say?

Have you found a way to consistently reproduce the error? One avenue to check is if certain files on the PC you are trying to upload leads to the error. One possibility is file size.
Bookmark Post in Technorati
Reply With Quote
  #5 (permalink)  
Old 03-06-2009, 03:58 PM
Member
 
Join Date: Mar 2009
Posts: 3
Rep Power: 0
sarang1 is on a distinguished road
Default
The error message is given by IE7 and it says only access is denied as a javascript error message.And I have seen the posts which mention similar issue with file upload control with .NET. But I am using java here...so just thought if it has got something to do with input type="file"?Also,file size is of no concern here as there are very few records in it.
Bookmark Post in Technorati
Reply With Quote
  #6 (permalink)  
Old 03-08-2009, 02:50 AM
Steve11235's Avatar
Senior Member
 
Join Date: Dec 2008
Posts: 972
Rep Power: 2
Steve11235 is on a distinguished road
Default
If Javascript is giving you the error, then 99% of the time this is a purely a browser problem. If it only happens with IE7, then make that 99.9% of the time.

JSP is only creating the HTML tag, which is purely text. Check that the tag is not malformed. Otherwise, I think we can be 99.9% sure that this is an IE7 bug.
Bookmark Post in Technorati
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't get my "if" statement to read user input daletron3030 New To Java 7 01-16-2009 06:24 AM
"request entity too large" when downloading a 2mb file arnab321 CLDC and MIDP 4 11-06-2008 05:34 PM
the dollar sign "$", prints like any other normal char in java like "a" or "*" ? lse123 New To Java 1 10-20-2008 08:35 AM
trouble with Scanner(new File("input")); ronyosi New To Java 7 06-16-2008 12:33 PM
".hotjava/properties" file on mac willemjav Java Applets 0 03-08-2008 01:53 AM


All times are GMT +2. The time now is 03:45 AM.



VBulletin, Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2009, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org