Thanks, both of you, I'll go the XML entities route if that's all that's available.
-----Original Message----- From: Matt Bathje [mailto:[EMAIL PROTECTED] Sent: Monday, February 02, 2004 12:35 PM To: Struts Users Mailing List Subject: Re: Is there an INCLUDE feature that works with struts-config? I think XML entities would do what he wants. What you do is, at the top of your struts-config.xml file, you define the entities you want to include: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 1.1//EN" "http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd" [ <!ENTITY actionMappings SYSTEM "/path/to/actionMappings.xml"> <!ENTITY formBeans SYSTEM "/path/to/formBeans.xml"> ]> Then, at each place you want to use the entity in your file, you include it as an entity using &entityName; (so for the above example: &actionMappings; and &formBeans;) So to include action mappings in your struts config that you have defined in another file, you would do: <action-mappings> <!-- hard coded action mapping, just for this app --> <action parameter=".view.checkoutPage" path="/checkoutPage" type="org.apache.struts.actions.ForwardAction"/> <!-- include common action mappings --> &actionMappings; </action-mappings> In struts-config, the entity paths can be relative to your struts-config.xml file (usually /WEB-INF/), or hard coded paths to somewhere else on the file system. If you want to use entities in tiles-defs.xml or validation.xml, they must be hard coded paths (for now...I'm investigating this in my free time!!). Matt Bathje ----- Original Message ----- From: "Hubert Rabago" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" <[EMAIL PROTECTED]> Sent: Monday, February 02, 2004 11:23 AM Subject: Re: Is there an INCLUDE feature that works with struts-config? > Probably not in the way you're thinking. > Struts allows you to specify more multiple config files for the same > app, so you can probably specify the app-specific config and the shared > config for each app. However, each of your apps will need to have copies of > the same shared XML. > If you're worried about duplication, you can have the shared config in > one location and have your build process copy it from there. > Just an idea. > > - Hubert > > --- "Anderson, James H [IT]" <[EMAIL PROTECTED]> wrote: > > We will have many related Struts apps that require identical entries in > > struts-config, so I'm wondering if there's a way to define common sets of > > entries and then include them in the config file for each of the apps. > > > > Thanks, > > > > jim > > > > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free web site building tool. Try it! > http://webhosting.yahoo.com/ps/sb/ > > --------------------------------------------------------------------- > 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]

