2. CASParameterWorkaroundServletFilter

2.1. Introduction

The CASParameterWorkaroundServletFilter class is a filter that will workaround a common issue that affects the behavior of the ServletRequest.getInputStream method. Any filter or servlet that invokes the ServletRequest.getParameter method may cause a following call to getInputStream to fail. This filter works around that issue.

2.2. Details

Any call to ServletRequest.getParameter might result in the invocation of a ServletRequest background method. This method will open the InputStream of the request and read from it. The inputstream is not resettable. This means that any following code that tries to read from the ServletRequest.getInputStream will get no data at all. The stream can only be read once. Normally this is not a problem since eg. POST variables are also accessible through the ServletRequest.getParameter method. This issue will cause problems when handling post request with GCNProxyServlet since the servlet itself just relays post data to the target.

The filter itself will parse the query string and extract the needed parameters from this data source instead of calling the getParameter() method of the wrapped request object.

2.3. Parameters

Table 7.1.  Portlet parameters for CASParameterWorkaroundServletFilter

NameTypeDefaultDescription
handledParameterNamesString-Defines set of parameter names which should be handled by this servlerfilter. Example: 'sid,ticket'.