summaryrefslogtreecommitdiffstats
path: root/pki
diff options
context:
space:
mode:
Diffstat (limited to 'pki')
-rw-r--r--pki/base/common/src/com/netscape/cms/servlet/request/QueryReq.java11
1 files changed, 11 insertions, 0 deletions
diff --git a/pki/base/common/src/com/netscape/cms/servlet/request/QueryReq.java b/pki/base/common/src/com/netscape/cms/servlet/request/QueryReq.java
index 5b4a3b059..98f624160 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/request/QueryReq.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/request/QueryReq.java
@@ -92,6 +92,7 @@ public class QueryReq extends CMSServlet {
private IReqParser mParser = null;
private IRequestQueue mQueue = null;
private String mFormPath = null;
+ private int mMaxReturns = 2000;
public CMSRequest newCMSRequest() {
return new CMSRequest();
@@ -115,6 +116,12 @@ public class QueryReq extends CMSServlet {
mQueue = mAuthority.getRequestQueue();
mFormPath = "/" + mAuthority.getId() + "/" + TPL_FILE;
+ try {
+ mMaxReturns = Integer.parseInt(sc.getInitParameter("maxResults"));
+ } catch (Exception e) {
+ /* do nothing, just use the default if integer parsing failed */
+ }
+
String tmp = sc.getInitParameter(PROP_PARSER);
if (tmp != null) {
@@ -302,6 +309,10 @@ public class QueryReq extends CMSServlet {
maxCount = Integer.parseInt(req.getParameter(IN_MAXCOUNT));
} catch (Exception e) {
}
+ if (maxCount > mMaxReturns) {
+ CMS.debug("Resetting page size from " + maxCount + " to " + mMaxReturns);
+ maxCount = mMaxReturns;
+ }
HttpServletResponse resp = cmsReq.getHttpResp();
CMSTemplateParams argset = doSearch(locale[0],filter, maxCount, direction, top, bottom );