Uploaded image for project: 'OODT (Retired)'
  1. OODT (Retired)
  2. OODT-605 Upgrade the CAS-Product web application to use JAX-RS
  3. OODT-649

Add PathUtils.replaceEnvVariables() wrapper around retrieved context parameters

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 0.7
    • 0.7
    • product server
    • Don't Know (Unsure) - The default level

    Description

      Methods in several classes in the cas.product.service.resources package retrieve parameters from the servlet context using the context.getInitParameter(String parameterName) method call, for example as follows:

      setWorkingDirPath(context.getInitParameter("filemgr.working.dir"));
      

      But these parameters may contain environment variables such as [HOME] or [FMPROD_HOME], etc. Currently, these aren't processed properly and the getInitParameter call needs to be wrapped in a call to PathUtils.replaceEnvVariables() (from the cas-metadata module) to process the environment variables, for example as follows:

      setWorkingDirPath(PathUtils.replaceEnvVariables(
        context.getInitParameter("filemgr.working.dir")));
      

      This is already done in the original Data, RDF and RSS servlets but was accidentally omitted from the new resource classes in the cas.product.service.resources package.

      Attachments

        Activity

          People

            rlaidlaw Ross Laidlaw
            rlaidlaw Ross Laidlaw
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: