Index: /main/trunk/greenstone3/src/java/org/greenstone/gsdl3/action/Action.java
===================================================================
--- /main/trunk/greenstone3/src/java/org/greenstone/gsdl3/action/Action.java	(revision 32447)
+++ /main/trunk/greenstone3/src/java/org/greenstone/gsdl3/action/Action.java	(revision 32448)
@@ -87,7 +87,8 @@
 
 	/**
-	 * tell the param class what its arguments are if an action has its own
-	 * arguments, this should add them to the params object - particularly
-	 * important for args that should not be saved
+	 * tell the param class what its arguments are.
+	 * if an action has its own arguments, this should add them to 
+	 * the params object - particularly
+	 * important for args that need to be saved to the session
 	 */
 	public boolean addActionParameters(GSParams params)
Index: /main/trunk/greenstone3/src/java/org/greenstone/gsdl3/action/DepositorAction.java
===================================================================
--- /main/trunk/greenstone3/src/java/org/greenstone/gsdl3/action/DepositorAction.java	(revision 32447)
+++ /main/trunk/greenstone3/src/java/org/greenstone/gsdl3/action/DepositorAction.java	(revision 32448)
@@ -21,4 +21,5 @@
 import org.greenstone.gsdl3.util.DerbyWrapper;
 import org.greenstone.gsdl3.util.GSConstants;
+import org.greenstone.gsdl3.util.GSParams;
 import org.greenstone.gsdl3.util.GSXML;
 import org.greenstone.gsdl3.util.GSXSLT;
@@ -40,4 +41,9 @@
 	private final String DE_CLEAR_DATABASE = "cleardatabase";
 
+  // cgi args
+  private final String DE_PAGE_ARG = "dePage";
+  private final String CURRENT_PAGE_ARG = "currentPage";
+  private final String FILE_TO_ADD_ARG = "fileToAdd";
+  
 	public Node process(Node message)
 	{
@@ -55,5 +61,5 @@
 		HashMap<String, Serializable> params = GSXML.extractParams(param_list, false);
 
-		String collection = (String) params.get("c");
+		String collection = (String) params.get(GSParams.COLLECTION);
 
 		int pageNum = -1;
@@ -61,5 +67,5 @@
 		try
 		{
-			pageNum = Integer.parseInt(((String) params.get("dePage")));
+			pageNum = Integer.parseInt(((String) params.get(DE_PAGE_ARG)));
 		}
 		catch (Exception ex)
@@ -72,5 +78,5 @@
 		try
 		{
-			prevPageNum = Integer.parseInt((String) params.get("currentPage"));
+			prevPageNum = Integer.parseInt((String) params.get(CURRENT_PAGE_ARG));
 		}
 		catch (Exception ex)
@@ -125,5 +131,5 @@
 			{
 				String paramName = paramIter.next();
-				if (paramName.startsWith("md___"))
+				if (paramName.startsWith(GSParams.MD_PREFIX))
 				{
 					Object paramValue = params.get(paramName);
@@ -270,5 +276,5 @@
 		else if (subaction.toLowerCase().equals(DE_DEPOSIT_FILE))
 		{
-			String fileToAdd = (String) params.get("fileToAdd");
+			String fileToAdd = (String) params.get(FILE_TO_ADD_ARG);
 			File tempFile = new File(GlobalProperties.getGSDL3Home() + File.separator + "tmp" + File.separator + fileToAdd);
 			if (tempFile.exists())
Index: /main/trunk/greenstone3/src/java/org/greenstone/gsdl3/action/DocumentAction.java
===================================================================
--- /main/trunk/greenstone3/src/java/org/greenstone/gsdl3/action/DocumentAction.java	(revision 32447)
+++ /main/trunk/greenstone3/src/java/org/greenstone/gsdl3/action/DocumentAction.java	(revision 32448)
@@ -803,19 +803,4 @@
 	}
 
-	/**
-	 * tell the param class what its arguments are if an action has its own
-	 * arguments, this should add them to the params object - particularly
-	 * important for args that should not be saved
-	 */
-	public boolean addActionParameters(GSParams params)
-	{
-		params.addParameter(GOTO_PAGE_ARG, false);
-		params.addParameter(ENRICH_DOC_ARG, false);
-		params.addParameter(EXPAND_DOCUMENT_ARG, false);
-		params.addParameter(EXPAND_CONTENTS_ARG, false);
-		params.addParameter(REALISTIC_BOOK_ARG, false);
-
-		return true;
-	}
 	
 	private boolean needSectionContent(HashMap<String, Serializable> params) {
Index: /main/trunk/greenstone3/src/java/org/greenstone/gsdl3/action/FormatAction.java
===================================================================
--- /main/trunk/greenstone3/src/java/org/greenstone/gsdl3/action/FormatAction.java	(revision 32447)
+++ /main/trunk/greenstone3/src/java/org/greenstone/gsdl3/action/FormatAction.java	(revision 32448)
@@ -33,4 +33,8 @@
     
     static Logger logger = Logger.getLogger(org.greenstone.gsdl3.action.FormatAction.class.getName());
+
+  public static final String CLASSIFIER_ARG = "cl";
+  public static final String DATA_ARG = "data";
+  
     XMLTransformer transformer = null;
 
@@ -56,5 +60,5 @@
 	    String coll = (String)params.get(GSParams.COLLECTION); //SYSTEM_CLUSTER);
         String service = (String)params.get(GSParams.SERVICE);
-        String classifier = (String)params.get("cl");
+        String classifier = (String)params.get(CLASSIFIER_ARG);
 
         String to = "";
@@ -73,5 +77,5 @@
         mr_request_message.appendChild(mr_request);
 	
-        String format_string = (String)params.get("data");
+        String format_string = (String)params.get(DATA_ARG);
     
         Element page_response = doc.createElement(GSXML.RESPONSE_ELEM);
Index: /main/trunk/greenstone3/src/java/org/greenstone/gsdl3/action/GeneralAction.java
===================================================================
--- /main/trunk/greenstone3/src/java/org/greenstone/gsdl3/action/GeneralAction.java	(revision 32447)
+++ /main/trunk/greenstone3/src/java/org/greenstone/gsdl3/action/GeneralAction.java	(revision 32448)
@@ -27,4 +27,7 @@
 {
 
+  public static final String CONFIG_CHANGE_NAME_ARG = "configChangeName";
+  public static final String CONFIG_CHANGE_VALUE_ARG = "configChangeValue";
+  
 	/** process a request */
 	public Node process(Node message_node)
@@ -48,8 +51,8 @@
 		HashMap<String, Serializable> params = GSXML.extractParams(cgi_param_list, false);
 
-		if (params.get("configChangeName") != null && params.get("configChangeValue") != null)
-		{
-			String optionName = (String) params.get("configChangeName");
-			String optionValue = (String) params.get("configChangeValue");
+		if (params.get(CONFIG_CHANGE_NAME_ARG) != null && params.get(CONFIG_CHANGE_VALUE_ARG) != null)
+		{
+			String optionName = (String) params.get(CONFIG_CHANGE_NAME_ARG);
+			String optionValue = (String) params.get(CONFIG_CHANGE_VALUE_ARG);
 
 			changeConfig(optionName, optionValue);
@@ -100,5 +103,5 @@
 			Element param_list = null;
 			// add in the service params - except the ones only used by the action
-			HashMap service_params = (HashMap) params.get("s1");
+			HashMap service_params = (HashMap) params.get(GSParams.SERVICE_PREFIX);
 			if (service_params != null)
 			{
Index: /main/trunk/greenstone3/src/java/org/greenstone/gsdl3/action/NoCollQueryAction.java
===================================================================
--- /main/trunk/greenstone3/src/java/org/greenstone/gsdl3/action/NoCollQueryAction.java	(revision 32447)
+++ /main/trunk/greenstone3/src/java/org/greenstone/gsdl3/action/NoCollQueryAction.java	(revision 32448)
@@ -97,5 +97,5 @@
 
 		// service paramList
-		HashMap service_params = (HashMap) params.get("s1");
+		HashMap service_params = (HashMap) params.get(GSParams.SERVICE_PREFIX);
 		if (service_params == null)
 		{ // no query
Index: /main/trunk/greenstone3/src/java/org/greenstone/gsdl3/action/ProcessAction.java
===================================================================
--- /main/trunk/greenstone3/src/java/org/greenstone/gsdl3/action/ProcessAction.java	(revision 32447)
+++ /main/trunk/greenstone3/src/java/org/greenstone/gsdl3/action/ProcessAction.java	(revision 32448)
@@ -86,5 +86,5 @@
 				request_type_att = GSXML.REQUEST_TYPE_PROCESS;
 				// add in the service params - except the ones only used by the action
-				HashMap service_params = (HashMap) params.get("s1");
+				HashMap service_params = (HashMap) params.get(GSParams.SERVICE_PREFIX);
 				if (service_params != null)
 				{
Index: /main/trunk/greenstone3/src/java/org/greenstone/gsdl3/action/QueryAction.java
===================================================================
--- /main/trunk/greenstone3/src/java/org/greenstone/gsdl3/action/QueryAction.java	(revision 32447)
+++ /main/trunk/greenstone3/src/java/org/greenstone/gsdl3/action/QueryAction.java	(revision 32448)
@@ -21,6 +21,19 @@
 {
 
-  public static final String HITS_PER_PAGE = "hitsPerPage";
+  public static final String HITS_PER_PAGE_ARG = "hitsPerPage";
 	static Logger logger = Logger.getLogger(org.greenstone.gsdl3.action.QueryAction.class.getName());
+  
+	/**
+	 * tell the param class what its arguments are.
+	 * if an action has its own arguments, this should add them to 
+	 * the params object - particularly
+	 * important for args that need to be saved to the session
+	 */
+	public boolean addActionParameters(GSParams params)
+	{
+	  // some query services don't do paging themselves, in shich case we do it here. Let tell servlet to save the param just in case nothing else is doing that.
+	  params.addServiceParameter(HITS_PER_PAGE_ARG, "20", true, false);
+		return true;
+	}
   
 	/**
@@ -351,5 +364,5 @@
 	{
 
-	  String hits_pp = (String) service_params.get(HITS_PER_PAGE);
+	  String hits_pp = (String) service_params.get(HITS_PER_PAGE_ARG);
 	 
 		int hits = 20;
@@ -427,5 +440,5 @@
   protected boolean addHitsParamToService(Document doc, Element service_description, String lang) {
     Element param_list = (Element)GSXML.getChildByTagName(service_description, GSXML.PARAM_ELEM+GSXML.LIST_MODIFIER);
-    Element param = GSXML.createParameterDescription(doc, HITS_PER_PAGE, getTextString("param." + HITS_PER_PAGE, lang, "ServiceRack", null), GSXML.PARAM_TYPE_INTEGER, "20", null, null);
+    Element param = GSXML.createParameterDescription(doc, HITS_PER_PAGE_ARG, getTextString("param." + HITS_PER_PAGE_ARG, lang, "ServiceRack", null), GSXML.PARAM_TYPE_INTEGER, "20", null, null);
     Element query_param = GSXML.getNamedElement(param_list, GSXML.PARAM_ELEM, GSXML.NAME_ATT, "query");
     if (query_param != null) {
