4 Replies Latest reply on Feb 7, 2003 12:32 PM by Juha Lindfors

    How to access undeployed files at runtime?

    Brijesh Newbie

      Let me explain the problem clearly.

      We have created one web application, Which uploads the files and stored it on the server (locally) where the application is deployed.

      Once the file is uploaded, I want to access that file and want to show its contents at runtime?

      My question is how can we access files which are not deployed and stored locally on the server?

      JBoss-Jetty allows to access only the files which are deployed. Is there anyway to access files which are not deployed and stored on the server? ( lets say my application is running on the C-Drive of the server and I want to access files from the location C:\UploadedFiles on the same server remotely ( from the remote machine ))

      I should mention here that the same thing is working fine on weblogic server!!

        • 1. Re: How to access undeployed files at runtime?
          suhas Newbie

          Hi,

          am also facing the same problem to view the uploaded files (stored in the server but not deployed)....can anyone help us?

          Thanks in advance,

          Regards,
          Suhas

          • 2. Re: How to access undeployed files at runtime?
            Bertels Leslie Newbie

            I face the same problem.
            I disallowed the directory browsing by setting dirAllowed to false.
            That takes care of unwanted browsing in the directories and that takes away the writing of a simple index.jsp in every directory.

            But I would like to have a URL like
            www.?????.be/appName/download
            where I can see a list of files to download.
            But I need to be able to put files in eg. c:\app\download\ and those files need to pop up when I browse to that URL.
            The reason why I need this, is because I do not want to recreate my .ear file every time I have a new file to download.
            I neighter want to create some extensive servlet that lookt at a directory and gives me the option to download...

            In other words, a simple configurable way to browse a directory chosen by me, while all the other directories are secure...


            Thanks in advance,
            Les.

            • 3. Re: How to access undeployed files at runtime?
              Bertels Leslie Newbie

              I face the same problem.
              I disallowed the directory browsing by setting dirAllowed to false.
              That takes care of unwanted browsing in the directories and that takes away the writing of a simple index.jsp in every directory.

              But I would like to have a URL like
              www.?????.be/appName/download
              where I can see a list of files to download.
              But I need to be able to put files in eg. c:\app\download\ and those files need to pop up when I browse to that URL.
              The reason why I need this, is because I do not want to recreate my .ear file every time I have a new file to download.
              I neighter want to create some extensive servlet that lookt at a directory and gives me the option to download...

              In other words, a simple configurable way to browse a directory chosen by me, while all the other directories are secure...


              Thanks in advance,
              Les.

              • 4. Re: How to access undeployed files at runtime?
                Juha Lindfors Master

                create new UCL that points to your u/l directory URL and do a getResourceAsStream() ?