From c3bf658058dbd6603658c77fdf31b9995b16f3b3 Mon Sep 17 00:00:00 2001 From: Costin Leau Date: Mon, 9 Nov 2009 19:11:41 +0000 Subject: [PATCH] SPR-6102 + add old method for backwards compatibility --- .../web/servlet/FrameworkServlet.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/org.springframework.web.servlet/src/main/java/org/springframework/web/servlet/FrameworkServlet.java b/org.springframework.web.servlet/src/main/java/org/springframework/web/servlet/FrameworkServlet.java index 8f2a98cd47..6b7b00d311 100644 --- a/org.springframework.web.servlet/src/main/java/org/springframework/web/servlet/FrameworkServlet.java +++ b/org.springframework.web.servlet/src/main/java/org/springframework/web/servlet/FrameworkServlet.java @@ -445,6 +445,20 @@ public abstract class FrameworkServlet extends HttpServletBean return wac; } + /** + * Instantiate the WebApplicationContext for this servlet, either a default + * {@link org.springframework.web.context.support.XmlWebApplicationContext} + * or a {@link #setContextClass custom context class}, if set. + * Delegates to #createWebApplicationContext(ApplicationContext). + * @param parent the parent WebApplicationContext to use, or null if none + * @return the WebApplicationContext for this servlet + * @see org.springframework.web.context.support.XmlWebApplicationContext + * @see #createWebApplicationContext(ApplicationContext) + */ + protected WebApplicationContext createWebApplicationContext(WebApplicationContext parent) { + return createWebApplicationContext((ApplicationContext) parent); + } + /** * Post-process the given WebApplicationContext before it is refreshed * and activated as context for this servlet.