order of plugin-struts.xml and struts.xml
We are currently using struts 2.0.14 with Spring. Is there any way of modifying the order of the config files for Struts2 plug-in modules? Currently, we have a Basic web app with a default package in which we define an adminCheck interceptor stack. Besides, we have an Advanced web app, which is supposed to be the Basic plus additional features. This we have implemented like a struts-plugin.xml. I would like to use for some actions of this plugin the adminCheck interceptor stack. This does not seem to work as the load order is struts-plugin.xml first, then struts.xml. Is this possible at all? Any other better solution? Josep
Re: order of plugin-struts.xml and struts.xml
On 9/22/10 12:35 PM, Josep García wrote: This does not seem to work as the load order is struts-plugin.xml first, then struts.xml. http://struts.apache.org/2.2.1/docs/plugins.html describes this strict ordering: struts-default.xml (bundled in the Core JAR) struts-plugin.xml (as many as can be found in other JARs) struts.xml (provided by your application) but note it doesn't discuss the order that multiple struts-plugin.xml's (in separate plugin.jars) will be loaded. I believe Musachy worked on making this specifiable, but haven't checked to see if this ever made it into the trunk: http://old.nabble.com/plugin-loading-order-to22889649.html Usually struts.xml will depend upon stuff in the earlier .xml documents, so I don't think it's either possible or advisable to load that earlier...I assume you tried using an undefined interceptor-ref that's defined in a document loaded later and that didn't work? -Dale - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: order of plugin-struts.xml and struts.xml
I think I remember seeing an ordering attribute/element somewhere, but I honestly don't recall where. On Wed, Sep 22, 2010 at 2:26 PM, Dale Newfield d...@newfield.org wrote: On 9/22/10 12:35 PM, Josep García wrote: This does not seem to work as the load order is struts-plugin.xml first, then struts.xml. http://struts.apache.org/2.2.1/docs/plugins.html describes this strict ordering: struts-default.xml (bundled in the Core JAR) struts-plugin.xml (as many as can be found in other JARs) struts.xml (provided by your application) but note it doesn't discuss the order that multiple struts-plugin.xml's (in separate plugin.jars) will be loaded. I believe Musachy worked on making this specifiable, but haven't checked to see if this ever made it into the trunk: http://old.nabble.com/plugin-loading-order-to22889649.html Usually struts.xml will depend upon stuff in the earlier .xml documents, so I don't think it's either possible or advisable to load that earlier...I assume you tried using an undefined interceptor-ref that's defined in a document loaded later and that didn't work? -Dale - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org