---
title: Handling query parameters
description: Configure PingAM Java Agent query parameter handling to retain or discard URL parameters before policy evaluation and not-enforced list checks.
component: java-agents
version: 2026
page_id: java-agents:user-guide:query-parameter-handling
canonical_url: https://docs.pingidentity.com/java-agents/2026/user-guide/query-parameter-handling.html
llms_txt: https://docs.pingidentity.com/java-agents/llms.txt
docs_for_agents: https://developer.pingidentity.com/build-with-ai/docs-for-agents.md
revdate: 2026-06-02T18:52:22Z
---

# Handling query parameters

For information about properties to configure query parameter handling, refer to [Query parameters](../properties-reference/preface.html#query_parameter).

By default, Java Agent considers any query parameters to be part of the URL, and inserts the entire string into the policy decision cache. For example, the agent inserts each of the following URLs in the cache, even though the root URL is the same:

```none
https://agent.example.com:443/protected/resource.jsp
https://agent.example.com:443/protected/resource.jsp?a=value1
https://agent.example.com:443/protected/resource.jsp?b=value2
```

Web applications that add new parameters to the URL on every request would fill the agent's policy cache without actually using it, which in turn causes the agent to request policy decision to AM each time.

To prevent this behavior, configure agents to do one of the following:

* Retain nominated URL parameters. For example, remove all except that are added as part of the policy evaluation.

  Configure one of the following properties:

  * [Query Parameter List for Policy Evaluation](../properties-reference/org.forgerock.agents.wanted.http.url.param.list.html)

  * [Regex Query Parameters List for Policy Evaluation](../properties-reference/org.forgerock.agents.wanted.http.url.params.regexp.list.html)

* Discard nominated URL parameters. For example, to remove all parameters added by the `angular.js` framework.

  Configure one of the following properties:

  * [Remove Query Parameters List for Policy Evaluation](../properties-reference/org.forgerock.agents.unwanted.http.url.param.list.html)

  * [Regex Remove Query Parameters List for Policy Evaluation](../properties-reference/org.forgerock.agents.unwanted.http.url.params.regex.list.html)

The properties are mutually exclusive, and the agent checks them in the following order of precedence:

1. Remove Query Parameters

2. Regular Expression Remove Query Parameters

3. Retain Query Parameters

4. Regular Expression Retain Query Parameters

|   |                                                                                                                                                                                                                                                                                                              |
| - | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|   | Java Agent strips nominated query parameters from the URL *before* taking the following actions:- Asking AM for policy evaluation

- Checking the not-enforced listsEnsure the policies defined in AM, and the not-enforced rules configured for the agent, do not expect a parameter that has been removed. |
