* char encoding
* @return processed url
*/
public String processUrl(HttpServletRequest request, String url, String encoding) {
IDataComposer dataComposer = HDIVUtil.getDataComposer(request);
if (dataComposer == null) {
// IDataComposer not initialized on request, request is out of filter
if (log.isDebugEnabled()) {
log.debug("IDataComposer not initialized on request, request is out of filter");
}
return url;
}
UrlData urlData = this.createUrlData(url, "GET", request);
if (this.isHdivStateNecessary(urlData)) {
// the url needs protection
dataComposer.beginRequest("GET", urlData.getUrlWithoutContextPath());
String processedParams = dataComposer.composeParams(urlData.getUrlParams(), "GET", encoding);
urlData.setUrlParams(processedParams);
// Hdiv state param value
String stateParam = dataComposer.endRequest();
// Url with confidential values and hdiv state param
url = this.getProcessedUrlWithHdivState(request, urlData, stateParam);
}
return url;