Uploaded image for project: '[Read Only] - Hippo Archetype'
  1. [Read Only] - Hippo Archetype
  2. ARCHE-485

Duplicate configuration of repository-address in web.xml

    XMLWordPrintable

Details

    • Improvement
    • Status: Closed
    • Normal
    • Resolution: Fixed
    • None
    • 14.0.0

    Description

      An archetype created project contains twice the repository-address location, namely as context-param and as init param in WicketFilter

      <context-param>
      <description>The address of the repository</description>
      <param-name>repository-address</param-name>
      <param-value>vm://</param-value>
      </context-param>

      <init-param>
      <param-name>repository-address</param-name>
      <param-value>vm://</param-value>
      </init-param>

      The context-param is a fallback when the init-param 'repository-address' is missing. Afaics, best to remove the 'init-param' as this cannot have side effects (and the other way around it could)

      For the fallback, see CMS main.java:

      @Override
          public String getConfigurationParameter(String parameterName, String defaultValue) {
              String result = getInitParameter(parameterName);
      
              if (result == null || result.equals("")) {
                  result = getServletContext().getInitParameter(parameterName);
              }
      
              if (result == null || result.equals("")) {
                  result = defaultValue;
              }
      
              return result;
          }
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            aschrijvers Ard Schrijvers
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: