Changeset 33090
- Timestamp:
- 2019-05-17T10:26:39+12:00 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone3/src/java/org/greenstone/gsdl3/LibraryServlet.java
r33083 r33090 89 89 * the cgi stuff - the Receptionist can add new args to this 90 90 * 91 * its used by the servlet to determine what args to save 91 * its used by the servlet to determine what args to save, 92 * and to set default values 92 93 */ 93 protected GSParams params = null;94 protected GSParams gs_params = null; 94 95 95 96 /** … … 222 223 if (params_name == null) 223 224 { 224 this. params = new GSParams();225 this.gs_params = new GSParams(); 225 226 } 226 227 else … … 228 229 try 229 230 { 230 this. params = (GSParams) Class.forName("org.greenstone.gsdl3.util." + params_name).newInstance();231 this.gs_params = (GSParams) Class.forName("org.greenstone.gsdl3.util." + params_name).newInstance(); 231 232 } 232 233 catch (Exception e) … … 234 235 System.err.println("LibraryServlet configure exception when trying to use a new params thing " + params_name + ": " + e.getMessage()); 235 236 e.printStackTrace(); 236 this. params = new GSParams();237 this.gs_params = new GSParams(); 237 238 } 238 239 } … … 263 264 message_router.setSiteName(site_name); 264 265 message_router.setLibraryName(library_name); 265 message_router.setParams(this. params);266 message_router.setParams(this.gs_params); 266 267 message_router.configure(); 267 268 this.recept.setMessageRouter(message_router); … … 298 299 299 300 // pass params to the receptionist 300 this.recept.setParams(this. params);301 this.recept.setParams(this.gs_params); 301 302 this.recept.configure(); 302 303 … … 649 650 session_ids_table.put(sid, session_cache); 650 651 session.setAttribute(GSXML.USER_SESSION_CACHE_ATT, session_cache); 651 //logger.info("new session id"); 652 653 // here we add in default params? 654 ArrayList<String> defp = this.gs_params.getParamsWithDefaults(); 655 Iterator i = this.gs_params.getParamsWithDefaults().iterator(); 656 while (i.hasNext()) { 657 String p = (String)i.next(); 658 String v = this.gs_params.getParamDefault(p); 659 if (!p.equals(GSParams.ACTION) && !p.equals(GSParams.SUBACTION) && !p.equals(GSParams.LANGUAGE) && !p.equals(GSParams.OUTPUT)) { 660 table.put(p,v); 661 } 662 } 663 652 664 } 653 665 } … … 693 705 } 694 706 // either add it to the param list straight away, or save it to the session and add it later 695 if (this. params.shouldSave(name) && table != null)707 if (this.gs_params.shouldSave(name) && table != null) 696 708 { 697 709 table.put(name, value); … … 702 714 param.setAttribute(GSXML.NAME_ATT, name); 703 715 param.setAttribute(GSXML.VALUE_ATT, GSXML.xmlSafe(value)); 704 if (this. params.isSensitive(name)) {716 if (this.gs_params.isSensitive(name)) { 705 717 param.setAttribute(GSXML.SENSITIVE_ATT, "true"); 706 718 }
Note:
See TracChangeset
for help on using the changeset viewer.