3 Replies Latest reply on Mar 23, 2009 6:11 PM by Ryan Sun

    "work" temp folder in "jboss-4.0.4/server/xxx/"

    Ryan Sun Newbie

      Im using jboss 4.0.4.
      When jboss is staring, there is a "work" folder created in jboss-4.0.4/server/xxx/.
      I was told it's created by Tomcat. I need to redirect this "work" folder to somewhere else, where can I config that?
      Thanks.

        • 1. Re:
          Peter Johnson Master

          I looked into this about a week or two ago for another poster and it appears that the work folder is hard coded. The other folder locations can be configured via system properties, but I have not found a way to change the work folder location.

          • 2. Re:
            jaikiran pai Master

            I think this folder name/location is not controlled by JBoss but is controlled by Tomcat/JBossWeb. The tomcat documentation http://tomcat.apache.org/tomcat-5.5-doc/config/context.html helped. Search for workDir on that page.

            So all you have to do is edit the %JBOSS_HOME%/server/< serverName>/deploy/jboss-web.deployer/context.xml as follows:

            <Context cookies="true" crossContext="true" workDir="/home/jaikiran/myworkfolder" >
            .... other stuff that's already in that file
            
            

            The path is the absolute path. So in this case, the work folder will be configured to /home/jaikiran/myworkfolder.

            For JBoss 4.0.4, the location of the context.xml will be %JBOSS_HOME%/server/< serverName>/deploy/*tomcat*.sar/context.xml.

            P.S: I also found another way to configure this in the %JBOSS_HOME%/server/< serverName>/deploy/jboss-web.deployer/conf/web.xml file, by passing as init-param a "scratchdir" property (search for scratchdir in that file) to the org.apache.jasper.servlet.JspServlet. But that one assumes that the folder will be present by default and it will not create one if the folder does not exist.


            • 3. Re:
              Ryan Sun Newbie

              Thanks a lot jaikiran and PeterJ, the problem is sovled.