if (session != null) {
model.put(KEY_SESSION, new HttpSessionHashModel(session, wrapper));
}
// Create hash model wrapper for the request attributes
HttpRequestHashModel requestModel = (HttpRequestHashModel) request.getAttribute(ATTR_REQUEST_MODEL);
if ((requestModel == null) || (requestModel.getRequest() != request)) {
requestModel = new HttpRequestHashModel(request, response, wrapper);
request.setAttribute(ATTR_REQUEST_MODEL, requestModel);
}
model.put(KEY_REQUEST, requestModel);
// Create hash model wrapper for request parameters
HttpRequestParametersHashModel reqParametersModel = (HttpRequestParametersHashModel) request.getAttribute(ATTR_REQUEST_PARAMETERS_MODEL);
if (reqParametersModel == null || requestModel.getRequest() != request) {
reqParametersModel = new HttpRequestParametersHashModel(request);
request.setAttribute(ATTR_REQUEST_PARAMETERS_MODEL, reqParametersModel);
}
model.put(ATTR_REQUEST_PARAMETERS_MODEL, reqParametersModel);
model.put(KEY_REQUEST_PARAMETERS_STRUTS,reqParametersModel);