|
From: John G. <ig...@do...> - 2005-02-20 19:50:15
|
Hi,
Actions wrapped by DelegatingActionProxy never have their setServlet()
method called. Does the following patch make sense?
John
--- src/org/springframework/web/struts/DelegatingActionProxy.java.orig 2004-12-11 15:47:46.000000000 +0200
+++ src/org/springframework/web/struts/DelegatingActionProxy.java 2005-02-20 21:18:37.647013908 +0200
@@ -117,8 +117,10 @@
*/
protected Action getDelegateAction(ActionMapping mapping) throws BeansException {
WebApplicationContext wac = getWebApplicationContext(getServlet(), mapping.getModuleConfig());
- String beanName = determineActionBeanName(mapping);
- return (Action) wac.getBean(beanName, Action.class);
+ String beanName = determineActionBeanName(mapping);
+ Action action = (Action) wac.getBean(beanName, Action.class);
+ action.setServlet(getServlet());
+ return action;
}
/**
|