Uploaded image for project: 'Cocoon'
  1. Cocoon
  2. COCOON-2067

CocoonServlet error message names wrong parameter: configurations

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Trivial
    • Resolution: Fixed
    • 2.1.10
    • 2.1.11
    • * Cocoon Core
    • None
    • Normal
    • Cocoon Core
    • Cocoon Core

    Description

      The error message in the last line of the code below misnames the parameter as 'configuration' instead of 'configurations'.
      The easy fix is to add an 's'.
      A better fix would move the string to a constant for use in all the code below

      [Obviously excerpted code. Pretend ellipses are after each line.]
      public class CocoonServlet extends HttpServlet {
        public void init(ServletConfig conf) throws ServletException {
            this.appContext.put(Constants.CONTEXT_CONFIG_URL, getConfigFile(conf.getInitParameter("configurations")));
        }
          private URL getConfigFile(final String configFileName) throws ServletException {
                  getLogger().warn("Servlet initialization argument 'configurations' not specified, attempting to use '/WEB-INF/cocoon.xconf'");
               getLogger().debug("Using configuration file: " + usedFileName);
               String msg = "Init parameter 'configurations' is invalid : " + usedFileName;
                     String msg = "Init parameter 'configurations' is invalid : " + usedFileName;
               String msg = "Init parameter 'configuration' doesn't name an existing resource : " + usedFileName;
         }
      }

      Attachments

        Activity

          People

            Unassigned Unassigned
            solprovider Paul Ercolino
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: