Changeset 5400
- Timestamp:
- 2003-09-01T15:33:58+12:00 (21 years ago)
- Location:
- trunk/gsdl3/src/java/org/greenstone/gsdl3
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl3/src/java/org/greenstone/gsdl3/LibraryServlet.java
r4986 r5400 48 48 super.init(config); 49 49 50 // disable preferences - does this work anyway?? 51 //System.setProperty("java.util.prefs.PreferencesFactory", "org.greenstone.gsdl3.util.DisabledPreferencesFactory"); 52 50 53 String library_name = config.getInitParameter(GSConstants.LIBRARY_NAME); 51 54 String gsdl3_home = config.getInitParameter(GSConstants.GSDL3_HOME); … … 86 89 message_router = (MessageRouter)Class.forName("org.greenstone.gsdl3.core."+mr_name).newInstance(); 87 90 } catch (Exception e) { // cant use this new one, so use normal one 88 System. out.println("LibraryServlet configure exception when trying to use a new MessageRouter "+mr_name+": "+e.getMessage());91 System.err.println("LibraryServlet configure exception when trying to use a new MessageRouter "+mr_name+": "+e.getMessage()); 89 92 e.printStackTrace(); 90 93 message_router = new MessageRouter(); … … 104 107 this.recept = (Receptionist)Class.forName("org.greenstone.gsdl3.core."+recept_name).newInstance(); 105 108 } catch (Exception e) { // cant use this new one, so use normal one 106 System. out.println("LibraryServlet configure exception when trying to use a new Receptionist "+recept_name+": "+e.getMessage());109 System.err.println("LibraryServlet configure exception when trying to use a new Receptionist "+recept_name+": "+e.getMessage()); 107 110 e.printStackTrace(); 108 111 this.recept = new DefaultReceptionist(); … … 120 123 this.params = (GSParams)Class.forName("org.greenstone.gsdl3.util."+params_name).newInstance(); 121 124 } catch (Exception e) { 122 System. out.println("LibraryServlet configure exception when trying to use a new params thing "+params_name+": "+e.getMessage());125 System.err.println("LibraryServlet configure exception when trying to use a new params thing "+params_name+": "+e.getMessage()); 123 126 e.printStackTrace(); 124 127 this.params = new GSParams(); … … 136 139 137 140 HttpSession session = request.getSession(true); 138 139 // print them out to test it140 // Enumeration stored_names = session.getAttributeNames();141 // System.out.println("session values are:");142 // while (stored_names.hasMoreElements()) {143 // String name = (String)stored_names.nextElement();144 // System.out.println("stored "+name+":" +session.getAttribute(name));145 // }146 141 147 142 request.setCharacterEncoding("UTF-8"); -
trunk/gsdl3/src/java/org/greenstone/gsdl3/collection/Collection.java
r4942 r5400 69 69 70 70 if (this.site_home == null || this.cluster_name== null) { 71 System.err.println(" site_home and collection_name must be set before configure called!");71 System.err.println("Collection: site_home and collection_name must be set before configure called!"); 72 72 return false; 73 73 } … … 97 97 98 98 if (!coll_config_file.exists()) { 99 System.err.println(coll_config_file+" does not exist"); 100 System.err.println("couldn't configure collection: "+this.cluster_name); 99 System.err.println("Collection: couldn't configure collection: "+this.cluster_name+", "+coll_config_file+" does not exist"); 101 100 return null; 102 101 } … … 114 113 File build_config_file = new File(GSFile.collectionBuildConfigFile(this.site_home, this.cluster_name)); 115 114 if (!build_config_file.exists()) { 116 System.err.println(build_config_file+" does not exist"); 117 System.err.println("couldn't configure collection: "+this.cluster_name); 115 System.err.println("Collection: couldn't configure collection: "+this.cluster_name+", "+coll_config_file+" does not exist"); 118 116 return null; 119 117 } … … 171 169 } 172 170 173 System.err.println(" ServiceCluster: cant process system request, configure "+subset);171 System.err.println("Collection: cant process system request, configure "+subset); 174 172 return false; 175 173 } -
trunk/gsdl3/src/java/org/greenstone/gsdl3/collection/ServiceCluster.java
r5151 r5400 123 123 124 124 if (this.site_home == null || this.cluster_name== null) { 125 System.err.println(" site_home and cluster_name must be set before configure called!");125 System.err.println("ServiceCluster: site_home and cluster_name must be set before configure called!"); 126 126 return false; 127 127 } … … 131 131 132 132 if (!config_file.exists()) { 133 System.err.println(config_file+" does not exist"); 134 System.err.println("couldn't configure cluster: "+this.cluster_name); 133 System.err.println("ServiceCluster: couldn't configure cluster: "+this.cluster_name +", "+config_file+" does not exist"); 135 134 return false; 136 135 } … … 154 153 if (!addMetadata(meta_list)) { 155 154 156 System.err.println(" couldn't configure the metadata");155 System.err.println("ServiceCluster: couldn't configure the metadata"); 157 156 } 158 157 } … … 163 162 if (!addDisplayItems(display_list)) { 164 163 165 System.err.println(" couldn't configure the display items");164 System.err.println("ServiceCluster: couldn't configure the display items"); 166 165 } 167 166 } … … 173 172 // is this an error? could you ever have a service cluster 174 173 // without service racks??? 175 System.err.println(" cluster has no service racks!!");174 System.err.println("ServiceCluster: cluster has no service racks!!"); 176 175 } else { 177 176 178 177 if (!configureServiceRack(service_rack_list, null)) { 179 System.err.println(" couldn't configure the service racks!!");178 System.err.println("ServiceCluster: couldn't configure the service racks!!"); 180 179 return false; 181 180 } … … 211 210 } 212 211 String name = d.getAttribute(GSXML.NAME_ATT); 213 System.out.println("adding display named "+name);214 212 Element this_item = GSXML.getNamedElement(this.display_item_list, GSXML.DISPLAY_TEXT_ELEM, GSXML.NAME_ATT, name); 215 213 if (this_item==null) { … … 241 239 NodeList nodes = service_rack_list.getElementsByTagName(GSXML.SERVICE_CLASS_ELEM); 242 240 if (nodes.getLength()==0) { 243 System.err.println(" Cluster configuration error: cluster "+this.cluster_name+" has no service modules!");241 System.err.println("ServiceCluster configuration error: cluster "+this.cluster_name+" has no service modules!"); 244 242 return false; 245 243 } … … 469 467 this.service_map.remove(module_name); 470 468 Element service_elem = GSXML.getNamedElement(this.service_list, GSXML.SERVICE_ELEM, GSXML.NAME_ATT, module_name); 471 System.out.println("service list before: "+this.converter.getPrettyString(service_list)); 472 service_list.removeChild(service_elem); 473 System.out.println("service list after: "+this.converter.getPrettyString(service_list)); 474 469 service_list.removeChild(service_elem); 475 470 message = module_type+": "+module_name+" deactivated"; 476 471 } else { -
trunk/gsdl3/src/java/org/greenstone/gsdl3/util/GSXML.java
r5260 r5400 211 211 String namespace = name.substring(0, pos); 212 212 name = name.substring(pos+1); 213 System.out.println("namespace = "+namespace+" name= "+name);214 213 HashMap map = (HashMap)param_map.get(namespace); 215 214 if (map == null) { -
trunk/gsdl3/src/java/org/greenstone/gsdl3/util/Misc.java
r4101 r5400 13 13 14 14 public static void printHash(HashMap map) { 15 System.out.println("Map entries are :");16 15 Set entries = map.entrySet(); 17 16 Iterator i = entries.iterator(); … … 20 19 String name = (String)m.getKey(); 21 20 String value = (String)m.getValue(); 22 System.out.println(name+"="+value);23 21 } 24 22 }
Note:
See TracChangeset
for help on using the changeset viewer.