3 Replies Latest reply on Jun 30, 2009 9:54 PM by mark.schwanke

    Overriding/Adding Status Icons via the ResourceLoaderSerlvet - Minor Issue

    Ryan Rutan


      In trying to add icons to the Status Level, I ran into a small bug in the ResourceLoaderServlet.  Apparently, the method getStatusLevelFileNames

      assumes that all Status icons will exist under a directory of /images/status;



      // add in any icons in the resource directory

      Set<String> keys = fileLocationMap.keySet();

      for (String path : keys) {

      if (path.startsWith("/images/status")) {












      however, when initializing the resource map in getFileNames the loop only addresses files that are in the root of the jiveHome/resources. 



      // Add in any filenames from the jiveHome/resources directory

              File resources = new File(new File(JiveGlobals.getJiveHome()), "resources");

              File[] children = resources.listFiles();

              if (children != null) {

                  for (File child : children) {

                      if (!child.isDirectory() && child.getName().indexOf('.') != 0 && !names.contains(child.getName()))








      I was able to work around this issue by copying my icons and files in both the /resources and /resources/images/status directories.  This enable the detection and resolutions to match.  Obviously this isn't preferred, but this is also something very aesthetic.



      I'll leave it up to you guys on how to fix...very simple fixes either way you go with it.