Announcement Announcement Module
No announcement yet.
Spring 3 + struts 2 + Spring Security 3 upload file Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Spring 3 + struts 2 + Spring Security 3 upload file


    I,m having a werid problem in order to control the process of file uploading.
    What I want is submit my form to upload a file and monitor the process with ajax. I already hava my super monitor but the problem is to found where the file is really uploaded.

    My first thought was that the file where uploaded when you enter in the struts action and do something like "myFileForm.getInputStream()". But it is uploaded before and put in some temp folder, so the action doesnīt read form the user pc, but form the server file system.

    Using struts alone, you can configure the multipartClass in the controller wich is who actually read the file from the user.

    The problen rise when you put spring (and spring security). When struts Servlet call multipartClass the file is already uploaded. I guess spring is who upload de file, but where????

    Reading post I saw:
    <bean id="multipartResolver"
    I tried to extend this class, but itīs never called, so I have no control over the file....

    Any idea?

    If you need, Iīll post all code wich could be usefull to uderstand the issue.