clickstreamEnabled = true;
}
if(clickstreamEnabled){
Clickstream404 clickstream404 = new Clickstream404();
clickstream404.setRefererURI(request.getHeader("Referer"));
String uri = (String)request.getAttribute("javax.servlet.forward.request_uri");
String queryString = (String)request.getAttribute("javax.servlet.forward.query_string");
if(request.getAttribute(WebKeys.CLICKSTREAM_URI_OVERRIDE) != null){
uri = (String) request.getAttribute(WebKeys.CLICKSTREAM_URI_OVERRIDE);
}
clickstream404.setRequestURI(uri);
clickstream404.setQueryString(queryString);
clickstream404.setHostId(host.getIdentifier());
Clickstream clickstream = (Clickstream) request.getSession().getAttribute("clickstream");
if(clickstream==null){
clickstream = addRequest(request, response, host);
}
if (user != null && clickstream.getUserId() == null) {
clickstream404.setUserId(user.getUserId());
}
clickstream404.setTimestamp(clickstream.getLastRequest());
clickstream.addClickstream404(clickstream404);
}
}