this seems to have broken the Validator plug-in, at least when running under the J2EE reference implementation, which uses pretty strict security restrictions by default. Maybe not even the Tiles plug-in is running under that environment anymore, I have only tested the Validator plug-in however.
This is caused by BeanUtils throwing an exception if the requested property isn't declared... BeanUtils tries to use setAccessible(true), which triggers an AccessControlException. At least that's what I understand.
On a related note, I think the ActionServlet (and others) should log everything through Commons-Logging, and not just some messages while others get logged through the ServletContext. This "distribution" of log messages made it *really* hard to track this problem down on the J2EE-RI server.
[EMAIL PROTECTED] wrote:
cedric 2002/12/27 02:52:22
Modified: src/share/org/apache/struts/action ActionServlet.java
Log:
Pass the current plugIn config object to the PlugIn during initialization.
The object is passed as a property of the plugin. The plugin should declare a
property "currentPlugInConfigObject" to be able to receive the config object.
The property is set only if the plugin declares it.
This plugin config object is needed by Tiles.
Revision Changes Path
1.138 +9 -5 jakarta-struts/src/share/org/apache/struts/action/ActionServlet.java
Index: ActionServlet.java
===================================================================
RCS file: /home/cvs/jakarta-struts/src/share/org/apache/struts/action/ActionServlet.java,v
retrieving revision 1.137
retrieving revision 1.138
diff -u -r1.137 -r1.138
--- ActionServlet.java 22 Dec 2002 05:31:14 -0000 1.137
+++ ActionServlet.java 27 Dec 2002 10:52:22 -0000 1.138
@@ -1093,7 +1093,11 @@
plugIns[i] =
(PlugIn)RequestUtils.applicationInstance(plugInConfigs[i].getClassName());
BeanUtils.populate(plugIns[i], plugInConfigs[i].getProperties());
- plugIns[i].init(this, (ModuleConfig) config);
+ // Pass the current plugIn config object to the PlugIn.
+ // The property is set only if the plugin declares it.
+ // This plugin config object is needed by Tiles
+ BeanUtils.copyProperty( plugIns[i], "currentPlugInConfigObject", plugInConfigs[i]);
+ plugIns[i].init(this, (ModuleConfig) config);
} catch (ServletException e) {
// Lets propagate
throw e;
-- Christopher Lenz /=/ cmlenz at gmx.de
-- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>