You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by doahh <ga...@prodia.co.uk> on 2009/02/12 13:05:47 UTC

Load a struts.xml that is not on the classpath

Hi,

My app is using the Java Plugin Framework (JPF) to provide plugin
functionality. The plugins for my app are not on the classpath as the JPF
manages that itself. My plugins have a struts.xml file in them and I would
like to be able to load the struts.xml from the plugin into my main app.
This of course needs to be done at runtime as I don't know which plugin
exist in my app until my PluginManager starts up. I have been trying this
but can't really piece things together:

Dispatcher dispatcher = new Dispatcher(servletContext , new
java.util.HashMap());
ConfigurationManager configurationManager = new
ConfigurationManager("pluginManager");
StrutsXmlConfigurationProvider strutsXmlConfigurationProvider = 
                    new
StrutsXmlConfigurationProvider(pluginDescriptor.getLocation().getPath() +
File.separator + "struts.xml" , false , servletContext);
dispatcher.setConfigurationManager(configurationManager);
dispatcher.init();

This seems to load the includes files that I specify in the plugins
struts.xml file but oddly, the Struts framework does not seem to know about
them and I get an error:

No result defined for action

If anyone can provide a pointer then it would be appreciated.
-- 
View this message in context: http://www.nabble.com/Load-a-struts.xml-that-is-not-on-the-classpath-tp21974673p21974673.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org