2 Replies Latest reply on Feb 28, 2008 1:33 PM by pete007

    How to access the deploy folder from inside my application

    Newbie

      Hello,

      I'm working on a system, that generates Images, places them in a special folder and puts a-hrefs in the response of the page.

      I created an folder "image" in the jboss-deployer, where I place my images. The full path is:

      $JBOSS_HOME\server\default\deploy\jboss-web.deployer\ROOT.war\images


      When I first tried to generate the image files, they got placed in:
      $JBOSS\bin\images\


      So I am using in my application the path
      ../server/default/deploy/jboss-web.deployer/ROOT.war/images


      This is okay for development, but when someone is using another configuration than default, the application will place the images in the wrong directory.

      So my question is, how can I find out, where the current application is running, or where I can find the ROOT.war of the currently used configuration? Is there any class/method, that holds the desired informations?

      If there's a better way to make the images accessible, I would like to hear how it works too.

      Thanks in advance, Peter