Menu

#13 Opal deploy directory relative to working directory not CATALINA_HOME as expected

v1.0_(example)
closed-fixed
nobody
None
5
2014-06-09
2014-06-04
James
No

If opal.deploy.path is a relative path then according to the documentation it is meant to be relative to the property catalina.home. The actual implementation is instead relative to the working directory that Tomcat is started in which could be anywhere.

I have attached a patch which checks to see if opal.deploy.path is relative and if it is then it looks for the directory relative to the path in environment variable CATALINA_HOME. I would have made this relative to the property catalina.home except that it's only specified in build.properties which is not available to the runtime as far as I know.

The patch also makes some minor tweaks like calling mkdirs (instead of mkdir) and actually checking if it works. I also decided to check if opal.deploy.path was actually a directory. I have no idea why there was a TODO statement to that effect when the required test was literally one line of code...

1 Attachments

Discussion

  • Luca Clementi

    Luca Clementi - 2014-06-09

    I pulled your patch into the code (with some minor fixes).

    I used the properties catalina.home instead of the env variable which can be undefined (on my system CATALINA_HOME was undefined), inside the Servlet.

    Next Opal release will have this fix.

    https://github.com/nbcrrolls/opaltoolkit/commit/521811e6d154b168078d5455f063c968b7b6a1fb

    Thanks,
    Luca

     
  • Luca Clementi

    Luca Clementi - 2014-06-09
    • status: open --> closed-fixed
     

Log in to post a comment.