/** * Finds and returns the default Tiles container object, if it was * previously initialized. * * @param context The (application) context object to use. * @return The container if it has been configured previously, otherwise * <code>null</code>. * @see #setContainer(Object, TilesContainer) * @deprecated Use one of the environment-specific Utilities (e.g. * ServletUtil). */ @Deprecated public static TilesContainer getContainer(Object context) { return (TilesContainer) getAttribute(context, CONTAINER_ATTRIBUTE); }
/** * Returns the Tiles application context object. * * @param context The (application) context to use. * @return The required Tiles application context. * @deprecated Use one of the environment-specific Utilities (e.g. * ServletUtil). */ @Deprecated public static TilesApplicationContext getApplicationContext(Object context) { TilesContainer container = getContainer(context); if (container != null) { return container.getApplicationContext(); } return (TilesApplicationContext) getAttribute(context, CONTEXT_ATTRIBUTE); }