import org.apache.cocoon.sitemap.objectmodel.ObjectModel;
public class ObjectModelProvider {
public static ObjectModel provide(Map<String, Object> parameters) {
ObjectModel objectModel = new ObjectModel(parameters);
Map<String, Object> cocoon = objectModel.getCocoonObject();
HttpServletRequest request = HttpContextHelper.getRequest(parameters);
cocoon.put("request", new ObjectModelRequest(request));
cocoon.put("response", HttpContextHelper.getResponse(parameters));
cocoon.put("context", HttpContextHelper.getServletContext(parameters));