Nico.
Filippo Munaf� a �crit :
Yes, the patch has trasparently extended also non default module config.
ActionServlet.init() (unmodified) call initModuleConfig first for default module and then for each module config found in controller init parameters.
So you can do something like this:
<init-param> <param-name>config</param-name> <param-value>/WEB-INF/struts-config.xml,META-INF/struts-config.xml</param-value> </init-param> <init-param> <param-name>config/module1</param-name> <param-value>/WEB-INF/module1/struts-config.xml,META-INF/module1/struts-config.xml</param-value> </init-param>
Or, for example, you can put module1 struts-config only in jar and the default only in WEB-INF:
<init-param> <param-name>config</param-name> <param-value>/WEB-INF/struts-config.xml</param-value> </init-param> <init-param> <param-name>config/module1</param-name> <param-value>META-INF/module1/struts-config.xml</param-value> </init-param>
Filippo
-----Original Message-----
From: nicolas De Loof [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 31, 2004 10:27
To: Struts Developers List
Subject: Re: Splitting struts-config into multiple jar and read them as reso urce stream
As far as I understand your patch, config included in jars is added to default module config.
Is they're any way to associate a jar (including config) to a struts module ?
Nico.
Filippo Munaf� a �crit :
Following your suggestion, I've just submitted a patch as bugzilla Enhancement (#28051).
I've tried to make as few changes as possible to the source of action servlet in order to avoid any regression.
Is it ok?
Filippo
-----Original Message-----
From: Craig R. McClanahan [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 23, 2004 18:38
To: Struts Developers List
Subject: Re: Splitting struts-config into multiple jar and read them as resource stream
Quoting Ted Husted <[EMAIL PROTECTED]>:
On Tue, 23 Mar 2004 11:53:55 +0100, Filippo Munaf� wrote:
Perfect! What you did in JSF is exatcly what we need:I think we do the same sort of thing in Commons Chain, n'est pas?
"the controller servlet automatically recognize 'META-INF/struts- config.xml' resources in any JAR files that were included in the application."
When in struts?
Can I help?
This particular functionality was in relationship to automatically finding and loading struts-config.xml files (contributed by JAR files dropped in to the WAR) without having to explicitly note them in context init parameters. It doesn't really relate to per-request processing.
I can't do this today, but anyone who wants to help on this need only submit an enhancement request (with a patch) to ActionServlet.init() to scan the configuration resources in addition to what it already does. The secret sauce is to use ClassLoader.findResources() to get the list of URLs to be processed.
-Ted.Craig
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
