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

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • passionateforjava
    New Member
    • Mar 2009
    • 4

    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="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.
  • r035198x
    MVP
    • Sep 2006
    • 13225

    #2
    I *think* that your session is expiring. Check the session expiry limit.

    Comment

    • passionateforjava
      New Member
      • Mar 2009
      • 4

      #3
      No,it has definately got nothing to do with the session coz other links from the same application works fine.

      Comment

      • r035198x
        MVP
        • Sep 2006
        • 13225

        #4
        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?

        Comment

        • passionateforjava
          New Member
          • Mar 2009
          • 4

          #5
          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.

          Comment

          • r035198x
            MVP
            • Sep 2006
            • 13225

            #6
            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?

            Comment

            • passionateforjava
              New Member
              • Mar 2009
              • 4

              #7
              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.

              Comment

              Working...