2 Replies Latest reply on Jun 13, 2006 4:55 PM by sshaikh

    temp data dir...

    sshaikh Newbie

      The application/EAR needs to generate the files/images at runtime on a local drive... and keep them there for later use. For example, generate the photos/images at runtime and put them on the local drive... and later use these photos/images to display on the page.

      What directory of JBoss/default-server should be used? Would the application (jsp/java file on webtier) be able to access these files? How this directory would be configured?

      Thanks in advance.
      Regards

        • 1. Re: temp data dir...
          Peter Johnson Master

          How will the images be accessed by the user? Will the web page contain links directly to the images, or will the web page contain a link to a servlet that will then access and return the image?

          If the former, then you should deploy an expanded ear file (as a directory) with an expanded war file (as a directory), and create a directory within the war directory and place the images there. For example, you might place an image at ./server/xxx/deploy/myapp.ear/mysite.war/images/picture.gif. Then the URL to access it would be /images/picture.gif. Your code can locate this directory by using the jboss.server.home.dir system property, with the string ?/deploy/myapp.ear/mysite.war/images/? appended.

          If the later, you could create a subdirectory under ./server/xxx/data and place images there. Your code can use the jboss.server.data.dir system property to locate the data directory and then append the subdirectory name to that.

          • 2. Re: temp data dir...
            sshaikh Newbie

            Thanks for the respons. It's really appreciated.

            By the way, my case is the former one... the images would directly be displayed on the page using the html image tag... no servlet would be used.

            At the moment I'm running this application under WebLogic as exploded dir... and following the same what you mentioned (keeping the images in the webapp/images folder).

            Though, I was just wondering if there is a way I can use while having the deployment as EAR file.

            Regards