Index: trunk/gsdl3/src/java/org/greenstone/gsdl3/LibraryServlet.java
===================================================================
--- trunk/gsdl3/src/java/org/greenstone/gsdl3/LibraryServlet.java	(revision 4982)
+++ trunk/gsdl3/src/java/org/greenstone/gsdl3/LibraryServlet.java	(revision 4986)
@@ -27,5 +27,5 @@
     
     /** the receptionist to send messages to */
-    protected WebReceptionist recept=null;
+    protected Receptionist recept=null;
     /** the default language - is specified by setting a servlet param,
      * otherwise DEFAULT_LANG is used*/
@@ -40,5 +40,6 @@
     /** the cgi stuff - the Receptionist can add new args to this
      * its used by the servlet to determine what args to save */
-    protected GSCGI cgi = null;
+    //protected GSCGI cgi = null;
+    protected GSParams params = null;
     /** initialise the servlet
      */
@@ -77,5 +78,5 @@
 	// new message router - create it and pass reference to recept.
 	// the servlet wont use this directly
-	String mr_name = (String)config.getInitParameter("messagerouter");
+	String mr_name = (String)config.getInitParameter("messagerouter_class");
 	MessageRouter message_router = null;
 	if (mr_name == null) { // just use the normal MR
@@ -96,10 +97,10 @@
 	
 	// the receptionist -the servlet will talk to this
-	String recept_name = (String)config.getInitParameter("receptionist");
+	String recept_name = (String)config.getInitParameter("receptionist_class");
 	if (recept_name == null) {
 	    this.recept = new DefaultReceptionist();
 	} else {
 	    try {
-		this.recept = (WebReceptionist)Class.forName("org.greenstone.gsdl3.core."+recept_name).newInstance();
+		this.recept = (Receptionist)Class.forName("org.greenstone.gsdl3.core."+recept_name).newInstance();
 	    } catch (Exception e) { // cant use this new one, so use normal one
 		System.out.println("LibraryServlet configure exception when trying to use a new Receptionist "+recept_name+": "+e.getMessage());
@@ -110,21 +111,22 @@
 	this.recept.setConfigParams(config_params);
 	this.recept.setMessageRouter(message_router);
-	this.recept.configure();
-	// the cgi arg thingy
-	
-	String cgi_name = (String)config.getInitParameter("cgiargs");
-	if (cgi_name == null) {
-	    this.cgi = new GSCGI();
+	// the params arg thingy
+	
+	String params_name = (String)config.getInitParameter("params_class");
+	if (params_name == null) {
+	    this.params = new GSParams();
 	} else {
 	    try {
-		this.cgi = (GSCGI)Class.forName("org.greenstone.gsdl3.util."+cgi_name).newInstance();
+		this.params = (GSParams)Class.forName("org.greenstone.gsdl3.util."+params_name).newInstance();
 	    } catch (Exception e) {
-		System.out.println("LibraryServlet configure exception when trying to use a new cgi thing "+cgi_name+": "+e.getMessage());
+		System.out.println("LibraryServlet configure exception when trying to use a new params thing "+params_name+": "+e.getMessage());
 		e.printStackTrace();
-		this.cgi = new GSCGI();
+		this.params = new GSParams();
 	    }
 	}
 	// pass it to the receptionist
-	this.recept.setCGI(this.cgi);
+	this.recept.setParams(this.params);
+	this.recept.configure();
+	
     }
     
@@ -147,8 +149,8 @@
 	PrintWriter out = response.getWriter();
 
-	String lang = request.getParameter(GSCGI.LANGUAGE_ARG);
+	String lang = request.getParameter(GSParams.LANGUAGE);
 	if (lang==null || lang.equals("")) {
 	    // try the session cached lang
-	    lang = (String)session.getAttribute(GSCGI.LANGUAGE_ARG);
+	    lang = (String)session.getAttribute(GSParams.LANGUAGE);
 	    if (lang==null || lang.equals("")) {
 		// still not set, use the default
@@ -158,7 +160,7 @@
 	
 	// set the lang in the session
-	session.setAttribute(GSCGI.LANGUAGE_ARG, lang);
-
-	String output = request.getParameter(GSCGI.OUTPUT_ARG);
+	session.setAttribute(GSParams.LANGUAGE, lang);
+
+	String output = request.getParameter(GSParams.OUTPUT);
 	if (output==null || output.equals("")) {
 	    output = "html"; // uses html by default
@@ -172,6 +174,6 @@
 	
 	
-	String action = request.getParameter(GSCGI.ACTION_ARG);
-	String subaction = request.getParameter(GSCGI.SUBACTION_ARG);
+	String action = request.getParameter(GSParams.ACTION);
+	String subaction = request.getParameter(GSParams.SUBACTION);
 	if (action==null || action.equals("")) {
 	    // should we do all the following stuff if using default page?
@@ -197,5 +199,5 @@
 	    while(params.hasMoreElements()) {
 		String name = (String)params.nextElement();
-		if (!name.equals(GSCGI.ACTION_ARG) && !name.equals(GSCGI.SUBACTION_ARG) && !name.equals(GSCGI.LANGUAGE_ARG) && !name.equals(GSCGI.OUTPUT_ARG)) {// we have already dealt with these 
+		if (!name.equals(GSParams.ACTION) && !name.equals(GSParams.SUBACTION) && !name.equals(GSParams.LANGUAGE) && !name.equals(GSParams.OUTPUT)) {// we have already dealt with these 
 		    String value="";
 		    String [] values = request.getParameterValues(name);
@@ -207,5 +209,5 @@
 		    }
 		    // either add it to the param list straight away, or save it to the session and add it later
-		    if (this.cgi.shouldSave(name)) {			
+		    if (this.params.shouldSave(name)) {			
 			session.setAttribute(name, value);
 		    } else { 
@@ -223,5 +225,5 @@
 		String name = (String)params.nextElement();
 		
-		if ( !name.equals(GSCGI.LANGUAGE_ARG) ) { // lang is stored but we dont want it in the param list cos its already in the request
+		if ( !name.equals(GSParams.LANGUAGE) ) { // lang is stored but we dont want it in the param list cos its already in the request
 		    
 		    Element param = this.doc.createElement(GSXML.PARAM_ELEM);
