0 Replies Latest reply on Jun 23, 2004 10:52 AM by alban_coul

    Delete Files in tmp directory

    alban_coul Newbie

      Hello!
      Maybe it is a silly question...
      I would like to know why it is not possible for me to delete files in the tmp directory of JBoss. I have got a J2EE application that through an online administration add or delete photos, these photos are uploaded in the tmp directory (server/default/tmp/deploy/tmp***), these photos are then backed up in another directory. But if the user is not sure of its choices about the photos to upload (imagine he uploads 100 photos but keep 10 of them: the 10 are backed up but the 100 remain in the tmp directory) it can overload the directory.
      I use java.io.File.delete() to delete them. The application is in a JBoss secure domain . Do I have to go out of this domain to be allowed to delete these file, or do I have to fill Permission's stuff somewhere?
      The only solution I have for now is to undeployed and re-deployed the application after the directory gets too big.
      Thank for your help!