5 Replies Latest reply on Nov 19, 2006 3:07 AM by mrh

    Finding "jboss.home.dir" server variable in a jsp file?

    mrh

      I have to upload files in my webapp. Default dir that jboss4.0.4 is using, is user home dir (Fedora core5 ), I can't do implicit addressing. I don't know where jboss is installed.
      org.jboss.system.server.ServerConfigImpl class is my answer?
      Thanks.

        • 1. Re: Finding
          jaikiran

           

          Finding "jboss.home.dir" server variable in a jsp file?


          System.getProperty("jboss.home.dir");




          • 2. Re: Finding
            mrh

             

            "jaikiran" wrote:
            Finding "jboss.home.dir" server variable in a jsp file?


            System.getProperty("jboss.home.dir");




            Hi Jaikiran

            The variable JBOSS_HOME, is not a system variable, it is used only in jbossAS. It is my problem.
            I can set it as a system variable but this isn't a good solution. for example, I don't have sufficient permission on my hosting sercver. Is there any servlet method for obtaining jboss server variable, shuch as ASP server object?

            thanks.

            • 3. Re: Finding
              jaikiran

               

              The variable JBOSS_HOME, is not a system variable, it is used only in jbossAS. It is my problem.
              I can set it as a system variable but this isn't a good solution.


              JBoss while starting up, sets this variable(or some other variables) using System.setProperty() API. So you should be able to obtain the value using the System.getProperty() API mentioned in the earlier post. Give it a try from a JSP/Servlet.



              • 4. Re: Finding
                jaikiran

                 

                "jaikiran" wrote:


                JBoss while starting up, sets this variable(or some other variables)



                I meant,

                JBoss while starting up, sets this variable(and some other variables)




                • 5. Re: Finding
                  mrh

                  I must using application.getRealPath().

                  Thanks