* Creates a TilesApplicationContext from the given context.
*/
public TilesApplicationContext createApplicationContext(Object context) {
if (context instanceof ServletContext) {
ServletContext servletContext = (ServletContext) context;
return new ServletTilesApplicationContext(servletContext);
} else if (context instanceof PortletContext) {
PortletContext portletContext = (PortletContext) context;
return new PortletTilesApplicationContext(portletContext);
} else {