Object request,
Object response) {
ServletContext servletContext = getServletContext(context);
PortletContext portletContext = getPortletContext(context);
if (servletContext != null) {
return new ServletTilesRequestContext(servletContext,
(HttpServletRequest) request,
(HttpServletResponse) response);
} else if (portletContext != null) {
PortletTilesApplicationContext app = (PortletTilesApplicationContext) context;
return new PortletTilesRequestContext(app.getPortletContext(),