Uploaded image for project: 'OODT'
  1. OODT
  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

    • Type: Sub-task
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 0.7
    • Fix Version/s: 0.7
    • Component/s: product server
    • Labels:
    • Skill Level:
      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

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

              Dates

              • Created:
                Updated:
                Resolved: